Skip to content

Instantly share code, notes, and snippets.

@Schnouki
Created July 28, 2015 09:58
Show Gist options
  • Save Schnouki/765d18c9317a08b05fde to your computer and use it in GitHub Desktop.
Save Schnouki/765d18c9317a08b05fde to your computer and use it in GitHub Desktop.
A script to show the last commit in each branch.
#!/usr/bin/env zsh
git branch "$@" | grep --line-buffered -v '/HEAD' | while read branch; do
git log -n1 --format="format:%C(auto)%D%Creset - %s %Cgreen(%ar)%Creset %C(bold blue)<%an>%n" "${branch/* /}"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment