Last active
December 13, 2019 07:02
-
-
Save mukuljainx/1fb31161acd7eb44230b3438eda778c2 to your computer and use it in GitHub Desktop.
Bash command to fetch Pull Request with PR ID ( Only works with Github )
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
## Append this to bashrc file or zshrc file | |
fetch-pr(){ | |
if [ "$1" = "" ] | |
then | |
echo 'Plese Provide PR number as agrument.' | |
echo 'For example, fetch-pr 47' | |
else | |
git fetch origin pull/$1/head:pr-$1 && git checkout pr-$1 | |
fi | |
} | |
## Example fetch-pr 352 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment