List Git Branches With Extra Information
April 3 2025

A git command to list branches with some extra information and output in color.

git for-each-ref \
  refs/heads \
  --sort=-committerdate \
  --format='%(committerdate:short) %(color:red)%(objectname:short) %(color:yellow)%(refname:short)%(color:reset) %(color:cyan)%(authorname)%(color:reset) (%(color:green)%(committerdate:relative)%(color:reset))'