blob: dae9a452a78b5e10ff9454597f54cefe02231913 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html lang="en">
<HEAD>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
<title>Authoring the CVS .cvsignore file</title>
<meta name="keyword" content="team">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1 CLASS="Head">Authoring the CVS .cvsignore file</H1>
<P>When committing resources, often there are resources that you do not want to
add to version control. One way you can do this is by using the CVS &quot;ignore&quot;
facility, which reads the contents of the file <i>.cvsignore</i> to determine
what to ignore.</P>
<P>The <i>.cvsignore</i> file can be added to any directory of a project. Many
existing CVS projects already contain several of these files. This text file
consists of a list of files, directories, or patterns.
</P>
<P>For example, to add a .cvsignore file to ignore the entire bin directory of
an existing project:
</P>
<ol>
<li>In one of the navigation views, select a project that contains a /bin directory.
The bin directory will commonly contain the projects build output. These are
files that are generated from the project's source files and are usually not
version-controlled.</li>
<li>From the pop-up menu for the project, select <b> New &gt; File</b>.&nbsp;</li>
<li>Type <i>.</i><samp>cvsignore</samp> as the file name, then press <b>Finish</b>.
The file will be created in your project's root directory. You should see
it in one of the navigation views.</li>
<li>Enter <samp>bin</samp> in the .cvsignore file and save it.</li>
<li>Select the project.&nbsp; From the context menu, select the <b> Team &gt;
Synchronize with Repository</b> menu item.&nbsp; Notice that the bin directory
does not show as an outgoing change. It is ignored.</li>
</ol>
<P>The cvsignore file consists of a list of files, directories, or patterns.
In a similar way to the global ignore facility, the wildcards * and ? may be
present in any entry in the .cvsignore file. Any file or sub-directory
<i>in the current directory</i> that matches any one of the patterns will
be ignored.
</P>
<p><b>Tip:</b> In the Team menu and in the Synchronize view resource context menu there is a menu item (<b>Add to .cvsignore</b>)
for adding a file pattern
to the appropriate .cvsignore file. This menu item is enabled for resources that are not yet under CVS version
control.
</p>
<p><img border="0" src="../images/ngrelc.png" alt="Related concepts" ><br>
<a href="../concepts/concepts-26.htm">Team programming with CVS</a><br>
</p>
<p><img border="0" src="../images/ngrelt.png" alt="Related tasks" ><br>
<a href="tasks-115.htm">Synchronizing with the repository</a><br>
<a href="tasks-100d.htm">Version control life cycle: adding and ignoring resources</a><br>
<a href="tasks-100d1.htm">Creating a global ignore pattern</a>
</p>
</BODY>
</HTML>