just list some branches

git branch

list sorted branches with the one with the most recent commit on top

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

list sorted branches with the hash

git for-each-ref --sort=-committerdate refs/heads/

from stackexchange