Either copy the aliases from the .gitconfig or run the commands in add-pr-alias.sh
Easily checkout local copies of pull requests from remotes:
git pr 4- creates local branchpr/4from the githubupstream(if it exists) ororiginremote and checks it outgit pr 4 someremote- creates local branchpr/4fromsomeremoteremote and checks it outgit pr-clean- removes all pr/* branches from your local repogit spr- Same asgit prcommand, but for bitbucket/stash remotes
Building on the building (and lazy defaults), since a lot of people use an upstream remote and that's where PRs are often worked... :)
pr = "!f() { git fetch -fu ${2:-$(git remote |grep ^upstream || echo origin)} refs/pull/$1/head:pr/$1 && git checkout pr/$1; }; f"