Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 14 lines (9 sloc) 233 Bytes
#!/usr/bin/env bash
# git-fetch-pr: fetch a pull request and check it out as a branch
usage() {
echo "usage: git fetch-pr <pr #>"
exit
}
[[ -z "${1}" ]] && usage
git fetch origin "pull/${1}/head:pr-${1}"
git checkout "pr-${1}"