Skip to content

Instantly share code, notes, and snippets.

@vitalymak
Last active July 14, 2016 12:52
Show Gist options
  • Save vitalymak/bd29a3cb45b2c8fb090cdcb747932c02 to your computer and use it in GitHub Desktop.
Save vitalymak/bd29a3cb45b2c8fb090cdcb747932c02 to your computer and use it in GitHub Desktop.
git checkout to upstream PR (pull request) with fetching it first
function gpr {
eval "git fetch upstream +refs/pull/"$@"/head:refs/remotes/upstream/pr/"$@" && git checkout upstream/pr/"$@""
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment