Skip to content

Instantly share code, notes, and snippets.

@commandodev
Last active December 25, 2015 20:59
Show Gist options
  • Save commandodev/7038852 to your computer and use it in GitHub Desktop.
Save commandodev/7038852 to your computer and use it in GitHub Desktop.
Nicer git branches
alias gbr='for k in `git branch|sed "s/^..//"`;do echo -e `git log -1 --pretty=format:"%Cgreen%ci %Cblue%cr%Creset" "$k"`\\t\\t"$k";done | sort -r | sed -e "s/\(^.*\):[0-9]\{2\} +\?[0-9]\{4\} /\1 /" -e "s/minutes/mins/"'
alias gbra='for k in `git branch -a|sed "s/^..//"`;do echo -e `git log -1 --pretty=format:"%Cgreen%ci %Cblue%cr%Creset" "$k"`\\t\\t"$k";done | sort -r | sed -e "s/\(^.*\):[0-9]\{2\} +\?[0-9]\{4\} /\1 /" -e "s/minutes/mins/"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment