Skip to content

Instantly share code, notes, and snippets.

@jeffchao
Last active May 27, 2023 09:26
Show Gist options
  • Save jeffchao/6556183 to your computer and use it in GitHub Desktop.
Save jeffchao/6556183 to your computer and use it in GitHub Desktop.
Show git branches ordered by latest commit. Also by name and date.
# By commit hash
git for-each-ref --sort=-committerdate refs/heads/
# By name, date.
git for-each-ref --sort=-committerdate refs/heads/ --format='%(committerdate:short) %(authorname) %(refname:short)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment