What should NOT be under source control?

Viewed 11443

It would be nice to have a more or less complete list over what files and/or directories that shouldn't (in most cases) be under source control. What do you think should be excluded?

Suggestion so far:

In general

  • Config files with sensitive information (passwords, private keys etc.)
  • Thumbs.db, .DS_Store and desktop.ini
  • Editor backups: *~ (emacs)
  • Generated files (for instance DoxyGen output)

C#

  • bin\*
  • obj\*
  • *.exe

Visual Studio

  • *.suo
  • *.ncb
  • *.user
  • *.aps
  • *.cachefile
  • *.backup
  • _UpgradeReport_Files

Java

  • *.class

Eclipse

I don't know, and this is what I'm looking for right now :-)

Python

  • *.pyc

Temporary files - .*.sw? - *~

24 Answers

Opinion: everything can be in source control, if you need to, unless it brings significant repository overhead such as frequently changing or large blobs.

3rd party binaries, hard-to-generate (in terms of time) generated files to speed up your deployment process, all are ok.

The main purpose of source control is to match one coherent system state to a revision number. If it would be possible, I'd freeze the entire universe with the code - build tools and the target operating system.

Related