Skip to content

Instantly share code, notes, and snippets.

@srhb
Created August 12, 2018 20:00
Show Gist options
  • Save srhb/d1ec4e9b433b63588d4b9604b55a238e to your computer and use it in GitHub Desktop.
Save srhb/d1ec4e9b433b63588d4b9604b55a238e to your computer and use it in GitHub Desktop.
pr = mkAlias "pr"
${git} fetch -fu \
${2:-$(${git} remote | grep "^upstream" || echo origin)} \
"refs/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