Created
April 14, 2020 11:31
-
-
Save gasolin/4f2555f5a241630365896bb26a8f1f5b to your computer and use it in GitHub Desktop.
script to fetch the PR and switched to the right branch
This file contains hidden or 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
#Create a bash in your ~/.bash_profile | |
# Do `source ~/.bash_profile` or reopen the console to make it work. | |
# Call `pr 1234` (1234 is the pull request number) | |
# the PR will be fetched and switched to the right branch | |
pr() { | |
git fetch upstream pull/$1/head:pr-$1 | |
git checkout pr-$1 | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment