top | item 47089148

(no title)

password4321 | 9 days ago

I don't delete branches, I just work with the top several most recently modified.

discuss

order

the_real_cher|9 days ago

How to list those? Is there a flag for git branch to sort by recently modified?

(not on my computer right now to check)

rpozarickij|9 days ago

This isn't exactly the same but I've been using git-recent [0] (with `gr` alias) for many years. It sorts branches based on checkout order (which is what I usually need when switching between branches) and allows to easily choose a branch to checkout to.

[0] https://github.com/paulirish/git-recent

embedding-shape|9 days ago

I do `gb` (probably "git branch" when I set that up) which apparently is an alias to `git for-each-ref --sort=-committerdate refs/heads/ --format='%(refname:short)' | tac`, displays a list with the latest changed branch at the bottom. Remove the `| tac` for the reverse order.