[cvsnt] Re: Best practice: .cvsignore files

David Somers dsomers at omz13.com
Sat Jul 8 20:14:49 BST 2006


Andreas Tscharner wrote:
> In the company I work for, we have had a discussion among the developers
> whether or not a per directory .cvsignore file should be added and
> commited to module or not.
> 
> The advantages of commiting the files are clear: Not everyone needs to
> have his/her own set of .cvsignore files to maintain and keep up to date

You should be able to specify that certain files are never to be committed,
and thus can set a policy to that effect... then just setup the .cvsignore
files to enforce that policy.

> Disadvantages: If a developer has his own files in the directories, and
> adds them to the ignore file, the .cvsignore file itself shows up as
> modified every time an update is made (which is as annoying as
> non-ignored file showing up).

What's the problem. Just update the .cvsignore file to get the latest
version.

Of course, your real problem is that you probably don't have a clear
idea/policy of what files you want to exclude, and each developer is simply
doing what they think is best... Honestly, it shouldn't be that much effort
to work out what files should be excluded... the rule I use is that any
file which is generated by magic or otherwise should NOT be committed. (The
only exception is if generating the file takes a long time... and even then
you should ensure that you can still build your system if that file isn't
there... just in case the magic used to generate it suddenly breaks).

> What do you guys do? Do you commit the .cvsignore files or not?

I commit them. For some projects I'm working on there are
intermediate/generated files written into the source tree...
using .cvsignore ensures that they are not committed, and by
having .cvsignore committed it means when those modules are checked out
that .cvsignore file is there, so nobody can accidentally commit unwanted
files.

-- 
David Somers
typographer/programmer/whatever



More information about the cvsnt mailing list