My cheat sheet for the git/fork/branch workflow
My cheat sheet 📜 for the git/fork/branch workflow.
git clone <forked repo>
git remote add upstream <original repo>.git
git pull upstream master
git push origin master
git checkout -b <branch>
git push origin <branch>
git checkout master
git pull upstream master
git branch -d <branch>
(or -D
if necessary)git push origin master
git push --delete origin <branch>
git pull upstream master
git push origin master
(when things go wrong, force fork to sync with upstream)
⚠ WARNING only do this if you do not have pending commits. They will be obliterated!
git fetch upstream
git reset --hard upstream/master
git push origin master --force
quod erat demonstrandum