jhermsmeier/git-branch-select

Sort by last commit date desc

Deleplace opened this issue · 4 comments

I love the git branch-select feature (and actually I find it odd that such a useful usage isn't built in git, alongside git checkout -p and git add -p !)

Most often, I want to checkout a branch that has been freshly modified by a colleague, after a git fetch. Would it be possible and sensible to :

  • include in list the branches origin/xxx that I've never checkouted yet, and
  • sort them by date (not alphabetically) ?

That's good to hear, I use it quite a lot too, especially handy when aliased to git bs or something short.

I've added the sorting by latest commit date now – should've thought about that earlier.
Working on the other things as well, but might not make those happen today.

Thanks for all the suggestions – good stuff!

@jhermsmeier would it possible to sort the other way around, with most recent at the bottom, and also the prompt at the bottom? When the list of commits is longer than the screen height, the prompt is outside of screen and you can't see the arrow or the most recent commits.

@Deleplace closing this issue, as the title's issue has been solved, and opening a new one (#13) for the remote branches

@franciscolourenco if you'd still like to have a reversed order, please open a new issue. Moving the prompt to the bottom is something I'm not going to do for now, as the lib I'm using for the prompt doesn't support it, and I can't justify putting in that work.

The sort was broken I assume some time later. It's now alphabetical.