1

Even when I start Emacs without any initialization file, it is still aware of version control. (For example, if I visit a git-controlled file, the modeline will say something like "Git:some-branch".)

Is there a convenient way to disable all VC/git awareness?

The goal is to make Emacs' behavior entirely independent of whether a file is under version control or not.

1
  • 1
    Not that I know of: I believe you'd have to dump a new emacs with (some of) the vc/ stuff elided. The autoloads target of the Makefile in emacs/lisp is the relevant target. But the vc/ subdir includes not only vc stuff, but also diff/ediff, emerge, add-log and various other things that you probably want to keep.
    – NickD
    Dec 1, 2021 at 19:47

1 Answer 1

3

vc is the package that handles version control for Emacs. You can disable it by customizing vc-handled-backends to nil:

vc-handled-backends is a variable defined in `vc-hooks.el'.

Its value is (Git)
Original value was 
(RCS CVS SVN SCCS SRC Bzr Git Hg Mtn)

List of version control backends for which VC will be used.
Entries in this list will be tried in order to determine whether a
file is under that sort of version control.
Removing an entry from the list prevents VC from being activated
when visiting a file managed by that backend.
An empty list disables VC altogether.
1
  • 1
    Just a word of caution: IIUC, doing this will make it hard for something like project.el to work with Git-projects. Dec 2, 2021 at 12:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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