How do I list the branches of a repository in Magit (i.e., the equivalent of git branch --list)? I expected to find this in the branch popup, but it seems to be neither there nor was I able to find it anywhere in the "Inspecting" section of the User's manual. What am I missing?
- You can use tab key to open the local branch section and close the remote refs section -- and probably that is sticky or can be made sticky. It still fetches the remote refs which can take some time.user65044– user650442017-11-20 18:45:45 +00:00Commented Nov 20, 2017 at 18:45
- 1I would add, that anytime you find yourself wondering what options do I have press ? it will list available options. I know this is not really an answer, but I don't have enough reputation to add a comment.A_P– A_P2018-10-18 11:49:21 +00:00Commented Oct 18, 2018 at 11:49
Add a comment |
2 Answers
Use magit-show-refs, bound by default to y.
- 19Thanks! In my defense, the documentation for this entire popup doesn't mention the word branch even a single time...Nikratio– Nikratio2016-09-18 03:13:53 +00:00Commented Sep 18, 2016 at 3:13
- Is there a way to limit this display to branches that are local, or being tracked (not list each and everything including remote refs?)Sankalp– Sankalp2017-09-22 06:25:06 +00:00Commented Sep 22, 2017 at 6:25
To list branches and tags directly in your Magit status buffer, customize magit-status-sections-hook to add any/all of:
magit-insert-local-branchesmagit-insert-remote-branchesmagit-insert-tags
- 2I was actually just thinking about implementing those yesterday -- so thanks for the reminder that I have already done so. ;Ptarsius– tarsius2020-11-16 10:50:43 +00:00Commented Nov 16, 2020 at 10:50
- 2Haha, love it when that happens. Thanks for all your work on Magit!Ben Sturmfels– Ben Sturmfels2020-11-16 11:20:50 +00:00Commented Nov 16, 2020 at 11:20