Is there a way to have the list of your (local) branches ordered by the date of the last commit on it (along with the id of the commit, maybe)? When you have tons of branches, like me, it could be sometime useful just to have a look at your most recent work just looking at the list of branches (without inspecting the logs).
Use git branch --sort=-committerdate to display a list of all local branches and sort them based on the date of their last commit. Use arrow keys to navigate, press Q to exit.
You can do it as explained in How can I get a list of git branches, ordered by most recent commit? but an easier way would be to install gitk which does exactly what your are doing. Gitk provides views than can display the all branches or only the branch that you want sorted by some field, like last commit, author, title, etc.
To learn it is really easy. Here is another related question to gitk Guide to understanding gitk?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With