Gangmax Blog

List The Remote Git Branches by Last Commit Date

From here.

1
2
# Credit http://stackoverflow.com/a/2514279
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r

Here is another command which can list all tags by the date they were created(from here):

1
git for-each-ref --sort=creatordate --format '%(refname) %(creatordate)' refs/tags

Comments