Step 3 - Files to Ignore
[Previous] [Main] [Next]

Steps for Setting up a Project


3. Set up your system to ignore (that is to NOT version control) selected files. This usually include files such as the objects or class files created when we compile our source code. We will do this with a CVSIGNORE file or environment variable.

NOTE: This is essential, but is not covered much in the CVS book or the manuals listed in the Resource section.

Tell CVS which files to ignore. For example the NetBeans tutorial suggested the following white space delimited environment var:
CVSIGNORE= *.class *.class~, *.java~, *.jar .nbattrs web.warContent (This author felt that the Netbeans and Forte IDE's ignored the .cvsignore file on his client and hence he had to use the environment variable.)

For windows I would suggest adding the following: *.zip *.doc

You can also specify folder names that you do NOT want CVS to recurse into.

Here is the relevant section from the manual.
The following are ignored by default:
·RCS SCCS CVS CVS.adm RCSLOG cvslog.* tags TAGS .make.state .nse_depinfo *~ #* .#* ,* _$* *$ *.old *.back *.back *.orig *.raj .del-* *.a *.alb *.o *.obj *.so *.exe *.Z *.elc *.ln core     
·The per-repository list in `$CVSROOT/CVSROOT/cvsignore' is appended to the list, if that file exists.  
·The per-user list in `.cvsignore' in your home directory is appended to the list, if it exists.  
·Any entries in the environment variable $CVSIGNORE is appended to the list.  
·Any `-I' options given to CVS is appended.  
·As CVS traverses through your directories, the contents of any `.cvsignore' will be appended to the list. The patterns found in `.cvsignore' are only valid for the directory that contains them, not for any sub-directories.  
·In any of the 5 places listed above, a single exclamation mark (`!') clears the ignore list. This can be used if you want to store any file which normally is ignored by CVS.  

In general I suggest putting a file called .cvsignore in your home folder or a file called cvsignore in the CVSROOT folder on your CVS server or for Windows in c:\.cvsignore. (Note: two have a leading period and one does not.) Place wild card names in this file, one per line, to describe files you do NOT want to version control.