Skip to content

Instantly share code, notes, and snippets.

View thushan's full-sized avatar

Thushan Fernando thushan

View GitHub Profile
@thushan
thushan / git-branches-by-commit-date.sh
Last active August 29, 2015 13:56 — forked from jasonrudolph/git-branches-by-commit-date.sh
List remote Git branches and the last commit date & user for each branch. Sorted by most recent commit date.
# Credit http://stackoverflow.com/a/2514279 && https://gist.github.com/jasonrudolph/1810768
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci\t%cr\t%an" $branch | head -n 1` \\t$branch; done | sort -r
# See https://www.kernel.org/pub/software/scm/git/docs/git-show.html for other data