Last active
April 18, 2016 05:51
-
-
Save jmoon90/6777c5a5fedb227930f68b40a34dfedd to your computer and use it in GitHub Desktop.
Git alias.
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] | |
| copr = "!f() { git fetch -fu origin refs/pull/$1/head:pr-$1; git checkout pr-$1; } ; f" | |
| prunepr = "!git for-each-ref refs/heads/pr-* --format='%(refname:short)' | while read ref ; do git branch -D $ref ; done" | |
| tree = log --pretty=oneline --abbrev-commit --graph --decorate | |
| # Instructions | |
| # 1. add to .gitconfig | |
| # 2. when pulling other people's branch you can use git copr 'pr number' | |
| # e.g git copr 32 // this will pull down the branch | |
| # 3. git prunepr // will remove all git copr pr's |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment