Sort Git Branches by Creation Date
Friday, June 13, 2025
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