Skip to content

Instantly share code, notes, and snippets.

@Xrayez
Last active April 21, 2019 18:18
Show Gist options
  • Save Xrayez/19dd42981e7c4b041aceb7b150b9ffa0 to your computer and use it in GitHub Desktop.
Save Xrayez/19dd42981e7c4b041aceb7b150b9ffa0 to your computer and use it in GitHub Desktop.
A simple bash function to fetch and checkout pull request using Git
get-pr() {
git fetch origin 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