Skip to content

Instantly share code, notes, and snippets.

@AdamFrey
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AdamFrey/42ad029c428a4dc4c86f to your computer and use it in GitHub Desktop.
Save AdamFrey/42ad029c428a4dc4c86f to your computer and use it in GitHub Desktop.
git co pull request
# Add these lines to your repo's .git/config file under the "[remote "origin"] header:
# fetch = +refs/heads/*:refs/remotes/origin/*
# fetch = +refs/pull/*:refs/pull/*
"git ls-remote origin | grep -E 'pull.*merge' | cut -f 2 | grep -o '[0-9]\+' | selecta | sed 's/^/refs\/pull\//; s/$/\/merge/' | xargs git checkout"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment