Last active
April 1, 2017 17:22
-
-
Save saagarjha/a1e3ffce33cea29f30911929025dfce2 to your computer and use it in GitHub Desktop.
Try out Git pull requests locally
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
#!/bin/sh | |
if [ $# == 1 ]; then | |
git fetch origin pull/$1/head:pr-$1 | |
git checkout pr-$1 | |
elif [ $# == 2 ]; then | |
git fetch $1 pull/$2/head:pr-$2 | |
git checkout pr-$2 | |
else | |
echo "Usage: git test-pr [remote] pr#" | |
false | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment