Developer Tools
Git Cheatsheet
Fast commands for everyday Git workflows.
Git Cheatsheet
Setup
git initgit clone <url>
Config
git config --global user.name "Your Name"git config --global user.email "you@example.com"git config --global init.defaultBranch main
Branching
git branchgit switch -c feature/new-toolgit merge feature/new-toolgit branch -d feature/new-tool
Commit
git statusgit add .git commit -m "feat: add tool"
Undo
git restore <file>git restore --staged <file>git commit --amendgit reset --soft HEAD~1
Remote
git remote -vgit remote add origin <url>git push -u origin maingit pull --rebase
Stash
git stashgit stash listgit stash applygit stash drop
Log
git log --oneline --decorate --graph --allgit show <commit>