GNU Emacs Manual - Registering

Node: Registering Next: VC Mode Line Prev: Version Control Undo Up: Editing with VC

Registering a File for Version Control

C-x v i
Register the visited file for version control.

You can put any file under version control by simply visiting it, and then typing C-x v i (vc-register ). After C-x v i, the file is unlocked and read-only. Type C-x C-q if you wish to start editing it.

When you register the file, Emacs must choose which version control system to use for it. You can specify your choice explicitly by setting vc-default-back-end to RCS , CVS or SCCS . Otherwise, if there is a subdirectory named `RCS', `SCCS', or `CVS', Emacs uses the corresponding version control system. In the absence of any specification, the default choice is RCS if RCS is installed, otherwise SCCS.

After registering a file with CVS, you must subsequently commit the initial version by typing C-x C-q. See CVS and VC.

The initial version number for a newly registered file is 1.1, by default. To specify a different number, give C-x v i a numeric argument; then it reads the initial version number using the minibuffer.

If vc-initial-comment is non-nil , C-x v i reads an initial comment (much like a log entry) to describe the purpose of this source file.


Next: VC Mode Line Up: Editing with VC