Created
May 11, 2017 13:21
-
-
Save mRB0/1420dc12a98525f9f6db872dad52be29 to your computer and use it in GitHub Desktop.
git alias for ahead-behind count
This file contains 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] | |
aheadbehind = !"f() { against=${1:-master}; git rev-list --left-right --count $against...HEAD | awk '{print \"You are \" $2 \" commit(s) ahead of '$against' and \" $1 \" commit(s) behind\"}'; }; f" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment