Skip to content

Instantly share code, notes, and snippets.

@jrwdexter
Created July 8, 2014 20:40
Show Gist options
  • Save jrwdexter/006766707548370afe8c to your computer and use it in GitHub Desktop.
Save jrwdexter/006766707548370afe8c to your computer and use it in GitHub Desktop.
Displays branches and history for the current git repository. Place in $PATH to use.
#!/bin/bash
for k in `git branch -a $@|perl -pe s/^..//`;do echo -e `git show --pretty=format:"%Cgreen%ci %Cblue%cr%Creset" $k|head -n 1`\\t$k;done|sort -r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment