I'd like to know the current branch I'm in (in elisp), is there a generic function that returns the name of the current branch?

From looking into vc-mode mode-line logic it seems this relies on private functionality.

Is there a generic way to access the current branch in Emacs? (Using git but via vc this might work for other version control systems too).

Your Answer

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

Browse other questions tagged or ask your own question.