Last active
October 5, 2016 16:52
-
-
Save gaizka/36e164579fd590f879b508815e17e5d1 to your computer and use it in GitHub Desktop.
A couple of git 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] | |
current-branch = rev-parse --abbrev-ref HEAD | |
latestbranches = for-each-ref --count=15 --sort=-committerdate --format='%(committerdate:relative) %(refname:short)' | |
latestnonmasterbranch = !git for-each-ref --count=15 --sort=-committerdate --format='%(refname:short)' | grep -Ev 'origin|stash|master' | grep -v `git current-branch` | head -n 1 | |
gotolast = !git co `git latestnonmasterbranch` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment