Posts

Showing posts from March, 2024

GitHub Cheat Sheet: Basic Version Control with Git

  GitHub Cheat Sheet: Basic Version Control with Git This cheat sheet provides a quick reference for essential Git commands you'll use for version control on GitHub. Setup: Install Git: Download and install Git from the official website ( https://git-scm.com/downloads ) Configure Git: Run git config --global user.name "Your Name" and git config --global user.email "your_email@example.com" to set your username and email for commits. Working with Repositories: Clone an existing repository: git clone https://github.com/<username>/<repository-name>.git to create a local copy of a remote repository on GitHub. Create a new local repository: git init to initialize a new Git repository in your current directory. Managing Changes: Track changes: git add <filename> to add a specific file to the staging area (where files are prepared for commit). Track a new folder: git add <foldername> to add all files within a folder to the sta...