A guide for releasing and maintaining open source projects.
Given you have this in your ~/.gitconfig:
[alias]
co-pr = !sh -c 'git fetch origin pull/$1/head:pr/$1 && git checkout pr/$1' -
Check out the code by its GitHub pull request number:
git co-pr 123Rebase interactively, squash, and potentially improve commit messages:
git rebase -i mainLook at changes:
git diff origin/mainRun the code and tests. For example, on a Ruby project:
bundle
rakeMerge code into main:
git checkout main
git merge pr/123 --ff-onlyPush:
git push origin mainClean up:
git branch -D pr/123