List and optionally format references (branches, tags) in a Git repository. More information: https://git-scm.com/docs/git-for-each-ref.
git for-each-ref
git for-each-ref refs/heads/
git for-each-ref refs/tags/
git for-each-ref --merged HEAD refs/heads/
git for-each-ref --format "%(refname:short)"
git for-each-ref --sort -committerdate
git for-each-ref --sort committerdate
git for-each-ref --count {{count}}