Skip to main content

28.1 Version Control

A version control system is a program that can record multiple versions of a source file, storing information such as the creation time of each version, who made it, and a description of what was changed.

The Emacs version control interface is called VC. VC commands work with several different version control systems; currently, it supports Bazaar, CVS, Git, Mercurial, Monotone, RCS, SRC, SCCS/CSSC, and Subversion. Of these, the GNU project distributes CVS, RCS, and Bazaar.

VC is enabled automatically whenever you visit a file governed by a version control system. To disable VC entirely, set the customizable variable vc-handled-backends to nil (see Customizing VC).

To update the VC state information for the file visited in the current buffer, use the command vc-refresh-state. This command is useful when you perform version control commands outside Emacs (e.g., from the shell prompt), or if you put the buffer’s file under a different version control system, or remove it from version control entirely.

• Introduction to VC  How version control works in general.
• VC Mode Line  How the mode line shows version control status.
• Basic VC Editing  How to edit a file under version control.
• Log Buffer  Features available in log entry buffers.
• Registering  Putting a file under version control.
• Old Revisions  Examining and comparing old versions.
• VC Change Log  Viewing the VC Change Log.
• VC Undo  Canceling changes before or after committing.
• VC Ignore  Ignore files under version control system.
• VC Directory Mode  Listing files managed by version control.
• Branches  Multiple lines of development.
• Miscellaneous VC  Various other commands and features of VC.
• Customizing VC  Variables that change VC’s behavior.