Skip to content

Instantly share code, notes, and snippets.

@ytsarev
Created November 20, 2015 10:27
Show Gist options
  • Save ytsarev/5fc3748a398f52274b73 to your computer and use it in GitHub Desktop.
Save ytsarev/5fc3748a398f52274b73 to your computer and use it in GitHub Desktop.
pr = "!f() { git fetch -fu ${2:-origin} refs/pull/$1/head:pr/$1 && git checkout pr/$1; }; f"
pr-clean = "!git for-each-ref refs/heads/pr/* --format='%(refname)' | while read ref ; do branch=${ref#refs/heads/} ; git branch -D $branch ; done"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment