Created
January 30, 2022 20:31
-
-
Save adamthede/29002af1f877a081582f58f8ee534617 to your computer and use it in GitHub Desktop.
List of Git branches, sorted by most recent first
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git for-each-ref --sort=-committerdate refs/heads/ | |
| # Or using git branch (since version 2.7.0) | |
| git branch --sort=-committerdate # DESC | |
| git branch --sort=committerdate # ASC | |
| 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))' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment