wikiti
9/6/2017 - 11:40 AM

Sort branches by date

Sort git branches by last commit date.

# Before 2.7.0
git for-each-ref --sort=-committerdate refs/heads/

# After version 2.7.0
git branch --sort=-committerdate  # DESC
git branch --sort=committerdate   # ASC