2

I create and checkout a new local branch via magit. Pressing

M-x magit-status then
b c for branch create 

and in the magit buffer I see the new name of the branch that I am apparently on. However my file buffer still shows the former branch name. Only if I reload the buffer content via C-x C-f the new branch is shown in the mode-line. Is this intentional or how can I change that?

5

A few years ago this was asked a lot, so added the answer to the FAQ. Copying it here:


Magit is not responsible for the version control information that is being displayed in the mode-line and looks something like Git-master. The built-in "Version Control" package, also known as "VC", updates that information, and can be told to do so more often:

(setq auto-revert-check-vc-info t)

But doing so isn’t good for performance. For more (overly optimistic) information see Version Control and the Mode Line.

If you don’t really care about seeing that information in the mode-line, but just don’t want to see incorrect information, then consider disabling VC when using Git:

(setq vc-handled-backends (delq 'Git vc-handled-backends))

Or to disable it completely:

(setq vc-handled-backends nil)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.