Skip to content

Git

Setup
Command Description
git init Initialize a repository
git clone [url] Clone a remote repository
Stage
Command Description
git status Show modified files
git add [file] Stage file
git reset [file] Unstage file
git diff Unstaged diff
git diff --staged Staged diff
Branch
Command Description
git branch List branch
git branch [name] Create new branch
git checkout Switch to another branch
Synchronisation
Command Description
git pull Pull from origin
git push Push to origin

Sources