My cheat sheet π for the git/fork/branch workflow.
- Fork it
git clone <forked repo>
git remote add upstream <original repo>.git
git pull upstream master
git push origin master
git checkout -b <branch>
- Work. Work. Work.
git push origin <branch>
- Create PR
- Wait for it to be merged, then ...
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