Visual Studio and Resharper .gitignore file

This is my .gitignore file for C# Visual Studio projects which use the Resharper plugin. It will also work perfectly fine for projects that don’t use Resharper.

The .gitignore file tells git which files should not be committed to the repository when you add a directory. It is useful for files that get generated by the build, your tools or the IDE. It’s also great for per-user configuration that shouldn’t get checked in.

# visual studio
obj/
[Bb]in
[Dd]ebug*/
[Rr]elease*/
*.sln.cache
*.suo
*.user
*.vspscc
*.vssscc
*.cache
*.bak
*.log
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm

# tools
_ReSharper.*
*.resharper.user
_TeamCity*

# operating system
thumbs.db
*.DS_Store
Desktop.ini

Github host a heap of .gitignore files for different types of projects including one for Visual Studio.

Posted on 16 Apr 13 by Helen Emerson (last updated on 16 Apr 13).
Filed under Source control