Quick Reference of Git Commands (Common Workflows)
Git Tips & Commands
As a handy reference, here are a few common git workflows you'll use.
Commit & Push
git pull
git status
git add .
git commit -m "Message that describes what this change does"
git push
Switch to an Existing Branch & Pull Latest Changes
NOTE: The first git pull ensures we get a list of all branches from the remote.
git pull
git status
git checkout my-branch-name
git pull
git status
Create a New Branch & Push It for the First Time
git status
git pull
git checkout -b my-branch-name
git status
git add .
git commit -m "Message that describes what this change does"
git push -u origin HEAD
Go Beyond Git
We offer the best coding courses and bootcamps for students at all levels of experience. Classes are hands-on and students receive workbooks with step-by-step instructions through exercises with real-world applications. Check out our programming courses now: