Created
February 14, 2014 08:50
-
-
Save rchavik/8997823 to your computer and use it in GitHub Desktop.
git pr aliases
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
pr = "!f() { git fetch -fu origin refs/pull/$1/head:pr/$1; } ; f" | |
prr = "!f() { git fetch -fu $1 refs/pull/$2/head:pr/$2; } ; f" | |
pru = "!f() { git fetch -fu upstream refs/pull/$1/head: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