Due to my workflow I have a lot of branches that I don't want to see in the magit helm checkout window. Is there a way to hide some branches here, preferably with a regexp?
Magit does not support this currently. You should open a feature request. I probably won't implement this any time soon, but an issue would help me to not forget about this completely.
Edit: I am longer considering to implement this. My recommendation is to set
remote.<name>.fetch so that the boring branches don't even make it into your local repository.
You can however abuse another feature that I just added for this purpose:
(advice-add 'magit-list-branch-names :around #'magit-list-branch-names:filter) (defun magit-list-branch-names:filter (fn) (-filter #'magit-refs-insert-refname-p (funcall fn)))
You will have to advice other
magit-list-* functions the same way for all commands to be affected. And obviously you have to customize
Another option could be to use a completion framework (such as
ivy) that let you easily deal with many completion candidates.