Created
March 20, 2017 16:53
-
-
Save gunnarx/7452caad6d5e94d3093491ebadbade1a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Shell function to pull a PR into a branch to study it locally | |
# ...original from unkonwn source (but probably from GitHub documentation) | |
review_pr () | |
{ | |
[ -z "$1" ] && { | |
echo "reviewpull <pull-request-number>"; | |
return 1 | |
}; | |
echo "git fetch origin pull/$1/head:pr_$1" | |
git fetch origin pull/$1/head:pr_$1 | |
echo "git checkout pr_$1" | |
git checkout pr_$1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment