I'm using emacs over sshfs and a git repository. I enjoy using the git command line and so for this project I do not need vc-git enabled. How do I prevent the loading of vc-git by a .emacs
command?
We can work with Git from Emacs using several packages — either use modules for VC и DVC packages, or use specialized packages, like: git.el, emacs-git, magit & egg. In first case we work with Git through standard interfaces of VC & DVC, while other packages implement interfaces, that allow user to get access to full Git power.
Emacs comes with a front end for Git, supporting a large subset of Git’s functionality. Emacs comes with a generic version control front end called VersionControl or VC. It supports Git and many other version control system (vcs). This is a good choice if you use other vcs besides Git or have no desire to use features unique to Git.
On 2007-10-03, the original author of VC mode, EricRaymond, announced a major rewrite of VC mode whose principal goal is “to change VC so that its primitive operations (notably checkin/commit) take sets of files as arguments rather than single files”. The necessary changes to the VC backend have already been added to EmacsFromCVS.
git-emacs is advertised as “yet another git mode on emacs for newbies”. DistributedVersionControl (DVC) is a generic front end similar to VC but specialized to modern dvcs like Git. Gited is a Git front end with a dired-like interface.
Remove it from find-file-hook
. This should disable the backend:
(remove-hook 'find-file-hook 'vc-find-file-hook)
you might need a (require 'vc)
before the above line to get the timing right. Or perhaps wrap it like so:
(eval-after-load "vc" '(remove-hook 'find-file-hook 'vc-find-file-hook))
to get the timing right.
Remove git from the list of backends handled by vc-mode:
(delete 'Git vc-handled-backends)
or remove all source control hooks:
(setq vc-handled-backends ())
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With