# Authoring the CVS .cvsignore file

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 "ignore" facility, which reads the contents of the file .cvsignore to determine what to ignore.

The .cvsignore 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.

For example, to add a .cvsignore file to ignore the entire bin directory of an existing project:

1. In the Navigator view, 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.
2. From the pop-up menu for the project, select New > File.
3. Type .`cvsignore` as the file name, then press Finish. The file will be created in your project's root directory. You should see it in the Navigator view.
4. Enter `bin` in the .cvsignore file and save it.
5. Select the project. From the context menu, select the Team > Synchronize with Repository menu item. Notice that the bin directory does not show as an outgoing change. It is ignored.

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 in the current directory that matches any one of the patterns will be ignored.

Tip: In the Team menu and in the Synchronize view resource context menu there is a menu item (Add to .cvsignore) 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.

Team programming with CVS

Synchronizing with the repository
Version control life cycle: adding and ignoring resources
Creating a global ignore pattern

www.cvshome.org: Ignoring files via cvsignore