manski's blog

Which project files under version control?

Different IDEs create different project files. Now the question is:

Which project files should I check into my VCS and which not?

This is what this article is about.

Just a few notes before we start:

  • Expressions like bin/ (note the trailing slash) represent directories
  • The names of directories holding the compiled sources can be renamed in most IDEs. I’ll list only the default directories.

Visual Studio 2010

Files to add:

  • *.sln
  • *.vcxproj, *.csproj
  • *.vcxproj.filters (C/C++ projects)
  • Properties/ (.NET projects)

Files to ignore:

  • *.user (including *.vcxproj.user)
  • *.sdf
  • *.opensdf
  • ipch/
  • Debug/ and Release/
  • bin/ and obj/ (.NET projects)


Files to add:

Files to ignore:

  • bin/ (default output directory), or *.class

IntelliJ, PyCharm, PhpStorm, WebStorm

Files to add:

  • .idea/ (except for workspace.xml)

Files to ignore:

  • .idea/workspace.xml


Combined .hgignore file

This section contains the contents for a .hgignore file that ignores all of the files mentioned above.

syntax: glob

# Visual Studio

# Eclipse

# JetBrains IDEs


  1. Clark Morgan said:

    Thanks very much…very useful. I would add this suffix to ignore for DevStudio files:


    My reasoning is based on this forum discussion.

  2. Edwin Steiner said:

    Thanks, this post was very helpful.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.