How do I prevent a file or folder from being checked into CVS?
Author: Deron Eriksson
Description: This tutorial demonstrates how to prevent a file or folder from being checked into CVS.
Tutorial created using: Windows XP || JDK 1.5.0_09 || Eclipse Web Tools Platform 1.5.2 (Eclipse 3.2.1)
(Continued from page 1)
Back in my Navigator view, I can see that EclipseSW created a .cvsignore file at the root level of my demo-project. We can see that the .cvsignore file contains one line, 'bin', to indicate that Eclipse is to ignore this directory when interacting with CVSW. We can see that bin no longer has a question mark on its folder, since Eclipse knows that it is supposed to be ignored. The bin folder also doesn't have an orange indicator icon on it, so we know that this folder and its contents are not version controlled.
However, notice that the .cvsignore file has a question mark indicator on it, since Eclipse is wondering if the file should be version controlled. The .cvsignore file should be version controlled since it specifies that bin should be ignored, and if another developer checks out demo-project, that developer's Eclipse should ignore bin too.
So, let's check in .cvsignore. I right-clicked .cvsignore and went to Team → Commit.
I typed 'added bin to cvsignore' as my CVS commit comment and then clicked Finish to commit the file to CVS.
In the Navigator view, we can see that the .cvsignore file has the orange indicator on it since it is now in version control. We can also see that bin is being 'ignored', so bin and its contents will not be checked into CVS.