Skip to content

Instantly share code, notes, and snippets.

@mukuljainx
Last active December 13, 2019 07:02
Show Gist options
  • Save mukuljainx/1fb31161acd7eb44230b3438eda778c2 to your computer and use it in GitHub Desktop.
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 )
## 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