Last active
December 21, 2015 19:20
-
-
Save glyphobet/6353960 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
# Recommended sort: -k2,2 -k1,1 | |
REMOTE='origin' | |
BRANCHES=$(git branch -r | grep $REMOTE | grep -v 'HEAD -> ') | |
for BRANCH in $BRANCHES ; do | |
git log -n 1 --pretty="%C(yellow)%ci%Creset %x00 %C(cyan)%an%Creset %x00 %C(blue)<%ae>%Creset %x00 %Cred${BRANCH:7}%Creset" $BRANCH | |
done | sort -t '\0' $@ | |
echo `echo $BRANCHES | wc -w` "remote ($REMOTE) branches found." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment