Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does one disable vc-git in emacs?

Tags:

git

emacs

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?

like image 554
Mike Axiak Avatar asked Apr 21 '11 19:04

Mike Axiak


People also ask

How to work with Git from Emacs?

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.

Does EMACs have version control?

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.

What happened to emacsfromcvs VC mode?

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.

What is the difference between GIT-Emacs and gited and distributed version control?

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.


2 Answers

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.

like image 29
Trey Jackson Avatar answered Sep 21 '22 06:09

Trey Jackson


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 ()) 
like image 165
fls Avatar answered Sep 22 '22 06:09

fls