Skip to content

Commit

Permalink
add git alias for checkout out PRs locally
Browse files Browse the repository at this point in the history
  • Loading branch information
nicknisi committed Jun 25, 2015
1 parent 2bd7d3b commit 87151f6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions git/gitconfig.symlink
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@
# Kaleidoscope commands
dkal = difftool -y -t Kaleidoscope
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]
diff = auto
status = auto
Expand Down

0 comments on commit 87151f6

Please sign in to comment.