My Standard .hgignore File

Since I started using Mercurial a few months ago I’ve fallen in love with it.  There was a bit of a learning curve for getting up and running but I found that the Tortoise tools are really intuitive and eliminated some of the pain.  Most importantly though, Mercurial addresses the single biggest problem I had when working away from home – no repository access.

So far (and I still have a lot to learn so this isn’t necessarily saying much) I’ve really only found one annoyance – there’s no default .hgignore file.  For the uninitiated, the .hgignore file contains a list of file name patterns that identify the files that should not be tracked in the repository.  Since there’s no default file we need to create (or copy) one for each new repository.

Visual Studio creates a slew of files that shouldn’t be tracked and I know that on the vast majority of my projects I’m going to at least start with the same set of ignore patterns.  For the most part I’ll be able to just copy the file from another repository but for future reference I’m including the contents of my current file here.

syntax: glob

I cobbled this together from a variety of sources including my memory and a few sites.  There are also some random tweaks for good measure.  Most of these entries are pretty standard.  The only item I’ll really call out is the last one which is created by NUnit for a test project.

This basic file has been serving me pretty well so far but my home environment is pretty simple.  If anyone has any suggestions for modifications to this list I’d love to hear them.