Created
January 28, 2020 09:02
-
-
Save arabek/455cc05076c4d6cbbd85b51646fc98f1 to your computer and use it in GitHub Desktop.
a simple script to checkout a numbered pull req
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/bash | |
if [ x$1 == x ]; then | |
echo "no pull request ref number specified at command line"; | |
exit 1; | |
else | |
git fetch origin +refs/pull/$1/merge:; | |
git checkout -qf FETCH_HEAD; | |
git checkout -b $1; | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment