You can put any file under version control by simply visiting it, and
then typing C-x v i (
To register the file, Emacs must choose which version control system
to use for it. If the file's directory already contains files
registered in a version control system, Emacs uses that system. If
there is more than one system in use for a directory, Emacs uses the
one that appears first in
(see Customizing VC).
On the other hand, if there are no files already registered, Emacs uses
the first system from
vc-handled-backends that could register
the file (for example, you cannot register a file under CVS if its
directory is not already part of a CVS tree); with the default value
vc-handled-backends, this means that Emacs uses RCS in this
If locking is in use, C-x v i leaves the file unlocked and read-only. Type C-x v v if you wish to start editing it. After registering a file with CVS, you must subsequently commit the initial revision by typing C-x v v. Until you do that, the revision ID appears as ‘@@’ in the mode line.
The default initial revision ID for a newly registered file
varies by what VCS you are using; normally it will be 1.1 on VCSes
that use dot-pair revision IDs and 1 on VCSes that use monotonic IDs.
You can specify a different default by setting the variable
vc-default-init-revision, or you can give C-x v i a
numeric argument; then it reads the initial revision ID for this
particular file using the minibuffer.
vc-initial-comment is non-
nil, C-x v i reads an
initial comment to describe the purpose of this source file. Reading
the initial comment works like reading a log entry (see Log Buffer).