add git alias for checkout out PRs locally

This commit is contained in:
Nick Nisi
2015-06-25 19:49:45 -04:00
parent 2bd7d3b5d9
commit 87151f6cb1

View File

@@ -78,6 +78,10 @@
# Kaleidoscope commands # Kaleidoscope commands
dkal = difftool -y -t Kaleidoscope dkal = difftool -y -t Kaleidoscope
remotes = remote -v remotes = remote -v
# check out a local copy of a PR. https://gist.github.com/gnarf/5406589
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"
[color] [color]
diff = auto diff = auto
status = auto status = auto