Git Version ControlCommands Cheat Sheet
Master version control with essential Git commands and workflows
Essential Commands
Workflow Ready
Team Collaboration
1
Setup & Basic OperationsSet Username
Set your username for all repositories
git config --global user.name "Your Name"
basicsetupconfig
Example:git config --global user.name "John Doe"
Quick Tip:Set this once globally, or per-repository without --global
Initialize Repository
Initialize a new Git repository in current directory
git init
basicsetupnew-project
Example:git init my-project
Quick Tip:Creates a .git folder to start version control
Clone Repository
Clone a repository from remote to local machine
git clone <repository-url>
basicsetupdownload
Example:git clone https://github.com/user/repo.git
Quick Tip:Downloads entire repository history and creates local copy
Check Status
Show the working tree status
git status
basicdailycheck
Quick Tip:Use frequently to see what files are modified or staged