Sort git commits

git branch –sort=-committerdate
or
git branch –sort=committerdate
or
git for-each-ref –sort=committerdate refs/heads/ –format=’%(HEAD) %(color:yellow)%(refname:short)%(color:reset) – %(color:red)%(objectname:short)%(color:reset) – %(contents:subject) – %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))’