Skip to content

Instantly share code, notes, and snippets.

@mike0004
Last active January 28, 2017 11:14
Show Gist options
  • Save mike0004/bb57bd321fe9381251f7 to your computer and use it in GitHub Desktop.
Save mike0004/bb57bd321fe9381251f7 to your computer and use it in GitHub Desktop.
show date of last commit for each branch in current repo
#!/bin/sh
# show the branches in git
for ref in $(git for-each-ref --sort=-committerdate --format="%(refname)" refs/heads/ refs/remotes ); do git log -n1 $ref --pretty=format:"%cr%d% an%n" | cat ; done | awk '! a[$0]++' | head -10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment