Set "vi" as the default editor
git config --global core.editor "vi"
Prepare a branch to work on fixes (assuming master
is always a clone of upstream/master
) :
git fetch --all
git checkout master
git merge upstream/master
git push
git branch fixes
git checkout fixes
Prepare the branch to create a pull request :
git fetch --all
git merge upstream/master
git add .
git commit -m "A clever commit message"
git push -u origin fixes
Clean-up after the pull request is merged :
git fetch --all
git checkout master
git merge upstream/master
git push
git branch -d fixes
git push origin --delete fixes
Rebase any development branches :
git checkout featurebranch
git rebase master
In case the pull request was squashed and not merged :
git fetch --all
git checkout master
git reset --hard upstream/master
git push --force