Skip to content

Instantly share code, notes, and snippets.

@vinyll
Last active July 26, 2021 07:07
Show Gist options
  • Save vinyll/9ece4665cbfabcca91952eab4a859c1f to your computer and use it in GitHub Desktop.
Save vinyll/9ece4665cbfabcca91952eab4a859c1f to your computer and use it in GitHub Desktop.
Add the `git branch-sort` command to sort all branches by date.
git config --global alias.branch-sort "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))'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment