IGNORE FILES

# Visual Studio Version Control With Mercurial

Article by:

## Overview

Following is an Mercurial ignore file for excluding the unnecessary files from a Visual Studio C# project (written when using the 2010 version, but should work with others). The ignore file is written using regex syntax.

It only excludes files that are within a folder called . This is to stop the ignore file excluding other files with the same extension from other sections of the repository. Replace with whatever folder name you choose to put the code in, or delete / completely and it will ignore these files anywhere in your repository.

The type of file excluded is commented beside each line, just incase you want to re-introduce some of these files for some reason.

Copy this code into the .hgignore file found in the root directory of your repository.

## Ignore File

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37  #************************************************************************* #***************************** C# IGNORE FILES *************************** #************************************************************************* # use regexp syntax syntax: regexp # Files that should be included: # .cs, .dll, .sln, .csproj, .resx, .config, .settings /.*\.pdb$# /.*\.user$ # User files /.*\.suo$/.*\.obj$ # Temp build files /.*\.pch$/.*\.vspscc$ /.*\._i\.c$/.*\._p\.c$ /.*\.ncb$/.*\.tlb$ /.*\.tlh$/.*\.bak$ /.*\.cache$/.*\.ilk$ /.*\.log$/.*\.lib$ /.*\.sbr$/.*\.scc$ /.*obj/.* # All files in "obj" folder (temporary object files for creating binary with /.*Debug/.* # All files in "obj" folder (temporary object files for creating binary with # InstallShield Files (all logfiles and reports) /.*?/DVD-5/LogFiles/.*? /.*?/DVD-5/Reports/.*? /.*?/SingleImage/LogFiles/.*? /.*?/SingleImage/Reports/.*? 

## Authors

### Geoffrey Hunter

Dude making stuff.