Export High-Res PDF
Switch to Light Mode
SkillSnap Official GuideUpdated 7/24/2026
Git
The distributed version control system. Master these commands to manage code history, branches, and remote collaboration.
Setup & Config
Set global usernamegit config --global user.name '[name]'
Set global emailgit config --global user.email '[email]'
Initialize new repository locallygit init
Clone remote repositorygit clone [url]
Stage & Snapshot
Show modified/staged filesgit status
Stage file for commitgit add [file]
Stage all changed filesgit add .
Commit staged contentgit commit -m '[msg]'
Add all tracked files & commitgit commit -am '[msg]'
Unstage file (keep changes)git reset [file]
Branch & Merge
List local branchesgit branch
Create new branchgit branch [name]
Switch to branchgit checkout [name]
Create & switch to new branchgit checkout -b [name]
Merge branch into currentgit merge [branch]
Delete branchgit branch -d [name]
Share & Update
Add remote repositorygit remote add origin [url]
Download changes (no merge)git fetch
Fetch and merge remote changesgit pull
Upload commits to remotegit push
Push & set upstream trackinggit push -u origin [branch]
Inspect & Compare
Show commit historygit log
Show condensed historygit log --oneline
Show unstaged changesgit diff
Show staged changesgit diff --staged
Show metadata/changes of commitgit show [commit]
Undo & Fix
Discard local changes in filegit restore [file]
Discard all local changesgit reset --hard
Modify last commit messagegit commit --amend