How to git branch by date

January 07, 2022

To list all git branches:

git branch --sort=-committerdate

To list latest x number of branches (example below lists the last 10):

git branch --sort=-committerdate | head -n 10