Master version control with confidence. No more git fear.
The commands you'll use every single day
git status
Check what's changed
git add .
Stage all changes
git commit -m "msg"
Save your changes
git push
Upload to GitHub
git pull
Download updates
git diff
See exact changes
Type # commit my changes with message "added login feature" and Warp builds the command for you.
Work on features without breaking main
git branch
List all branches
git checkout main
Switch to main
git checkout -b name
Create & switch
git branch -d name
Delete branch
Combine your work with the team's
git push -u origin your-branch
Go to GitHub and click "Compare & pull request"
Team reviews your code and approves
Click "Merge pull request" on GitHub
Type # create a pull request and Warp will help you use the gh command.
Everyone makes mistakes. Here's how to fix them.
git checkout -- file
Discard file changes
git reset HEAD~1
Undo last commit (keep changes)
git stash
Temporarily save changes
git stash pop
Restore stashed changes
When git can't auto-merge your changes
You'll see "CONFLICT" in the terminal
Look for <<<<<<< and >>>>>>> markers
Delete the markers and keep the correct code
git add . then git commit
VS Code shows "Accept Current" / "Accept Incoming" buttons right in the editor. Just click!
Quick reference for everything?
View Cheat Sheet