At work, I have a git project with several branches, one for each feature or bug I’m currently working on. Once in a while I like to clean those up in order to keep my sanity.

In the interest of performing that cleanup, I went looking for a command to list all branches in Magit. I found magit-show-refs-popup, which brings a pop-up window (or panel if you’re not used to Emacs’s terminology) that lists all refs.

I assigned the key H-r (for refs, because I have H-b already bound to something else).

(global-set-key (kbd "H-r") 'magit-show-refs-popup)

This was a very quick tip, but I hope you find it as useful as I did.

Saluti.