Sort Git Branches by Creation Date

A useful command to sort Git branches by creation date:

git for-each-ref --sort=committerdate refs/heads/ --format='%(committerdate:short) %(refname:short)'

Or if you want one with colors:

git for-each-ref --sort=committerdate refs/heads/ --format='%(color: red)%(committerdate:short) %(color: cyan)%(refname:short)'

Source: Stack Overflow

Cheatsheet Git