Cheat Sheet
Useful git commands
Branch
Move changes to another branch
git stash
# To create a new branch
git checkout -b correct-branch
# To use an existing branch...
# git checkout correct-branch
git stash popDiscard local changes
git reset --hard origin/master
git pull origin masterUpdate parent branch
git checkout feature_abc
git checkout -b feature_def
# --> Someone changed something in feature_abc
git pull origin feature_abcClone
Git clone private repo
Fork
Keeping a fork up to date
Track forks
Manage credentials
Store credentials permanently
Store credentials on cache
Module
Remove submodule
References
Push
You cannot push commits for '[email protected]'. You can only push commits that were committed with one of your own verified emails.
Tag
Create
Delete
Last updated