<div id="Tagging-the-working-directory"></div>
<div class="header">
<p>
Next: [[cvs: Specifying what to tag by date or revision#Specifying what to tag by date or revision|Tagging by date/tag]], Previous: [[cvs: Tags-Symbolic revisions#Tags&ndash;Symbolic revisions|Tags]], Up: [[cvs: Revisions#Revisions|Revisions]] &nbsp; |[[cvs: Index#SEC_Contents|Contents]]||[[cvs: Index#Index|Index]]|</p>
</div>

----

<div id="Specifying-what-to-tag-from-the-working-directory"></div>
=== Specifying what to tag from the working directory ===

<div id="index-tag-_0028subcommand_0029"></div>
The example in the previous section demonstrates one of
the most common ways to choose which revisions to tag.
Namely, running the <code>cvs tag</code> command without
arguments causes <small>CVS</small> to select the revisions which
are checked out in the current working directory.  For
example, if the copy of &lsquo;<tt>backend.c</tt>&rsquo; in working
directory was checked out from revision 1.4, then
<small>CVS</small> will tag revision 1.4.  Note that the tag is
applied immediately to revision 1.4 in the repository;
tagging is not like modifying a file, or other
operations in which one first modifies the working
directory and then runs <code>cvs commit</code> to transfer
that modification to the repository.

One potentially surprising aspect of the fact that
<code>cvs tag</code> operates on the repository is that you
are tagging the checked-in revisions, which may differ
from locally modified files in your working directory.
If you want to avoid doing this by mistake, specify the
&lsquo;<code>-c</code>&rsquo; option to <code>cvs tag</code>.  If there are any
locally modified files, <small>CVS</small> will abort with an
error before it tags any files:

<div class="example" style="margin-left: 3.2em">
 $ cvs tag -c rel-0-4
 cvs tag: backend.c is locally modified
 cvs <nowiki>[</nowiki>tag aborted<nowiki>]</nowiki>: correct the above errors first!
</div>

This document was generated on <i>a sunny day</i> using [http://www.nongnu.org/texi2html/ <i>texi2html</i>].
