66

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?

Nikratio
  • 919
  • 1
  • 6
  • 11
  • 1
    I 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 Oct 18 '18 at 11:49
  • 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 Nov 20 '17 at 18:45

2 Answers2

86

Use magit-show-refs, bound by default to y.

Kyle Meyer
  • 6,914
  • 26
  • 22
  • 16
    Thanks! In my defense, the documentation for this entire popup doesn't mention the word *branch* even a single time... – Nikratio Sep 18 '16 at 03: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 Sep 22 '17 at 06:25
3

To list branches and tags directly in your Magit status buffer, customize magit-status-sections-hook to add any/all of:

  • magit-insert-local-branches
  • magit-insert-remote-branches
  • magit-insert-tags