Like many .NET devs, I have started using GIT for my source control. It is just so much better than Subversion, Mercurial and any of the other free products.
I have been honing my .gitignore file, to try and include every conceivable file that I should not be committing. So far, I have come up with this list:
Assemblies/*
*\build
*\release
*\Release
*\debug
*\Debug
*.suo
*.dep
*.aps
*.vbw
*.obj
*.ncb
*.plg
*.bsc
*.ilk
*.exp
*.sbr
*.opt
*.pdb
*.idb
*.pch
*.res
*.user
*\bin
*\Bin
*\obj
_ReSharper*
*.exe
*.csproj.user
*.resharper.user
*.cache
TestResult.xml
TestResults/*
Thumbs.db
I just drop this in the root directory of the project which GIT is monitoring, and Bob’s your aunty’s live-in lover!
To verify that your ignored file is doing its job, navigate to your repository and run the following command:
$ git ls-files . --ignored --exclude-standard --others
While I’m spouting git commands, run this one to list untracked files (i.e. not ignored and not even tracked):
$ git ls-files . --exclude-standard --others
