<div id="checkout"></div>
<div class="header">
<p>
Next: [[cvs: commit--Check files into the repository#commit&mdash;Check files into the repository|commit]], Previous: [[cvs: admin--Administration#admin&mdash;Administration|admin]], Up: [[cvs: Guide to CVS commands#Guide to CVS commands|CVS commands]] &nbsp; |[[cvs: Index#SEC_Contents|Contents]]||[[cvs: Index#Index|Index]]|</p>
</div>

----

<div id="checkout_002d_002d_002dCheck-out-sources-for-editing"></div>
=== checkout&mdash;Check out sources for editing ===
<div id="index-checkout-_0028subcommand_0029"></div>
<div id="index-co-_0028subcommand_0029"></div>


* Synopsis: checkout <nowiki>[</nowiki>options<nowiki>]</nowiki> modules&hellip;

* Requires: repository.

* Changes: working directory.

* Synonyms: co, get

Create or update a working directory containing copies of the
source files specified by <var>modules</var>.  You must execute
<code>checkout</code> before using most of the other <small>CVS</small>
commands, since most of them operate on your working
directory.

The <var>modules</var> are either
symbolic names for some
collection of source directories and files, or paths to
directories or files in the repository.  The symbolic
names are defined in the &lsquo;<code>modules</code>&rsquo; file.
See [[cvs: The modules file#The modules file|modules]].

Depending on the modules you specify, <code>checkout</code> may
recursively create directories and populate them with
the appropriate source files.  You can then edit these
source files at any time (regardless of whether other
software developers are editing their own copies of the
sources); update them to include new changes applied by
others to the source repository; or commit your work as
a permanent change to the source repository.

Note that <code>checkout</code> is used to create
directories.  The top-level directory created is always
added to the directory where <code>checkout</code> is
invoked, and usually has the same name as the specified
module.  In the case of a module alias, the created
sub-directory may have a different name, but you can be
sure that it will be a sub-directory, and that
<code>checkout</code> will show the relative path leading to
each file as it is extracted into your private work
area (unless you specify the &lsquo;<code>-Q</code>&rsquo; global option).

The files created by <code>checkout</code> are created
read-write, unless the &lsquo;<code>-r</code>&rsquo; option to <small>CVS</small>
(see [[cvs: Global options#Global options|Global options]]) is specified, the
<code>CVSREAD</code> environment variable is specified
(see [[cvs: All environment variables which affect CVS#All environment variables which affect CVS|Environment variables]]), or a watch is in
effect for that file (see [[cvs: Mechanisms to track who is editing files#Mechanisms to track who is editing files|Watches]]).

Note that running <code>checkout</code> on a directory that was already
built by a prior <code>checkout</code> is also permitted.
This is similar to specifying the &lsquo;<code>-d</code>&rsquo; option
to the <code>update</code> command in the sense that new
directories that have been created in the repository
will appear in your work area.
However, <code>checkout</code> takes a module name whereas
<code>update</code> takes a directory name.  Also
to use <code>checkout</code> this way it must be run from the
top level directory (where you originally ran
<code>checkout</code> from), so before you run
<code>checkout</code> to update an existing directory, don&rsquo;t
forget to change your directory to the top level
directory.

For the output produced by the <code>checkout</code> command
see [[cvs: update output#update output|update output]].

 [[cvs: checkout options#checkout options|&bull; checkout options]]::            checkout options
 [[cvs: checkout examples#checkout examples|&bull; checkout examples]]::           checkout examples


----

<div class="header">
<p>
Next: [[cvs: commit--Check files into the repository#commit&mdash;Check files into the repository|commit]], Previous: [[cvs: admin--Administration#admin&mdash;Administration|admin]], Up: [[cvs: Guide to CVS commands#Guide to CVS commands|CVS commands]] &nbsp; |[[cvs: Index#SEC_Contents|Contents]]||[[cvs: Index#Index|Index]]|</p>
</div>
This document was generated on <i>a sunny day</i> using [http://www.nongnu.org/texi2html/ <i>texi2html</i>].
