Is there a way to list git branches sorted on "last checked out"?

已回答

My branch list when clicking on the git branch indicator in the lower right corner looks like the picture below... I never remember what the name of the branch I worked on an hour ago was because we name our branches after Jira ticket number. Can IntelliJ sort the list on "last checked out" instread of alphabetically?

(Oh and please don't suggest that we should change our process. I know that is an approach, but not the one I'm looking for)

 

5

Sadly though the "Recent in.." feature is quite broken in 2023.2 Beta. It doesn't stay collapsed, can't be disabled and doesn't show branches that have been worked on five minutes ago. There should be an option to get rid of this again.

4

> There should be an option to get rid of this again.

 
Me too, I would like to disable the "recent" section entirely.
 
3

Note that the Branches popup preselects the previously check-out branch when opened.

Sorting is not configurable - see/vote https://youtrack.jetbrains.com/issue/IDEA-151905

2

AH ok : it will come in 2023.2

2

 

Serdar
In the new 2023.2 EAP version, there is a Recent in <project> node in Git Branches popup.
It shows the list of latest checked out branches sorted by checkout time.

1

Hey Dmitry, that feature doesn't work anymore. It was very handy. Will that feature come back? 

0

Why I don't have this item "Recent in ..." in the menu ? I regret the feature that preselects the previously check-out branch :/ 

0

I DO like the “Recent” section. But I would like to configure the number of items listed (5 is not enough for me, I seem to switch branches quite often).
And by allowing to configure it to 0 items, the section could be disabled as well.

0

Wim Van Der Veen 

  1. Main menu -> Help -> 'Find Action' (or Ctrl+Shift+A)
  2. Type "registry", select the action called "Registry..."
  3. In the dialog that opens, start typing to find this option: git.recent.checkout.branches.reflog.entries.max.count
  4. Modify the number
0

请先登录再写评论。