Most Git tutorials throw an encyclopedia at you. But in reality, you’ll use the same ~10 commands every single day.
Here’s my no-fluff daily cheatsheet.
The absolute basics bash git clone # Download a repo git status # What changed? git add . # Stage everything git commit -m "fix: message" # Save changes
Working with remotes bash git pull --rebase # Get latest changes (cleaner history) git push # Upload your commits git fetch # See what changed without merging
Branching (daily) bash git branch # List branches (* = current) git checkout -b feat/x # Create + switch to new branch git switch main # Switch to main (newer syntax) git branch -d old-branch # Delete local branch
Fixing mistakes (no panic) bash git commit --amend -m "new message" # Edit last commit git reset HEAD~1 # Undo last commit (keep changes) git restore file.js # Discard unstaged changes git restore --staged .…