What to put under version control?

Rules of thumb: Include everything which has an influence on the build result (compiler options, file encodings, ASCII/binary settings, etc. ) Include everything to make it possible to open the project from a clean checkout and being able to compile/run/test/debug/deploy it without any further manual intervention Don't include files which contain absolute paths Avoid including personal preferences (tab size, colors, window positions) Follow the rules in this order.

1 I'd add two rules "Avoid anything that may be generated from other included files" and "Avoid anything that changes frequently and automatically" – sfussenegger Dec 10 '09 at 13:19 1 Rules 1 and 2 are totally wrong. They apply to the distribution tarball, but NOT to the VCS. – William Pursell Dec 10 '09 at 14:11 4 I actually agree with 1 and 2 100%.

It's very important to be able to get a copy of the source, type "ant run" or somesuch, and be up and going. I'll even include the source or binary of a library I depend on. I'm totally happy with this approach; it's far better than requiring all developers to go download and install something every time there's a new dependency.

– Russell Mull Dec 10 '09 at 14:35.

I think it's best to put anything under version control that helps developers to get started quickly, ignoring anything that may be auto-generated by an IDE or build tools (e.g. Maven's eclipse plugin generates . Project and . Classpath - no need to check these in).

Especially avoid files that change often, that contain nothing but user preferences, or that conflict between IDEs (e.g. Another IDE that uses . Project just like eclipse does). For eclipse users, I find it especially handy to add code style (.settings/org.eclipse.jdt.core.

Prefs - auto formatting on save turned on) to get consistently formatted code.

This is where build automation and build files come in. For example, you can still build the project (the two developers will need the same build software obviously) but they then could in turn use two different IDE's. As for the 'junk' that gets generated, I tend to ignore most if it.

I know this is meant to be language agnostic but consider Visual Studio. It generates user files (user settings etc..) this should not be under source control. On the other hand, project files (used by the build process) most certainly should.

I should add that if you are on a team and have all agreed on an IDE, then checking in IDE specific files is fine providing they are global and not user specific and/or not needed. Those other questions do a good job of explaining what should and shouldn't be checked into source control so I won't repeat them.

Everything that can be automatically generated from the source+configuration files should not be under the version control! It only causes problems and limitations (like the one you stated - using 2 different project files by different programmers). Its true not only for IDE "junk files" but also for intermediate files (like .

Pyc in python, . O in c etc).

In my opinion it depends on the project and environment. In a company environment where everybody is using the same IDE it can make sense to add the IDE files to the repository. While this depends a bit on the IDE, as some include absolute paths to things.

For a project which is developed in different environments it doesn't make sense and will be pain in the long run as the project files aren't maintained by all developers and make it harder to find "relevant" things.

As you write, some IDE include absolute paths, so its a real headache to put those files in. Plus - what's the benefit? If the 'junk files' get lost, you can re-generate them, and I don't remember a single time that I needed to revert back to a previous version of a project configuration.

– Ofri Raviv Dec 10 '09 at 13:07 Depending on the language and IDE you'Re using these files include build isntructions, build configurations, .. which might be worth sharing among developers for using similar settings – johannes Dec 10 '09 at 13:23.

Anything that would be devastating if it were lost, should be in SVN.

In my opinion, anything needed to build the project (code, make files, media, databases with required program info, etc) should be in repositories. I realise that especially for media/database files this is contriversial, but to me if you can't branch and then hit build the source control's not doing it's job. This goes double for distributed systems with cheap branch creation/merging.

Anything else? Store it somewhere different. Developers should choose their own working environment as much as possible.

I think it's best to put anything under version control that helps developers to get started quickly, ignoring anything that may be auto-generated by an IDE or build tools (e.g. Maven's eclipse plugin generates . Classpath - no need to check these in).

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions