I wanted to post this mostly for my future reference. But I think it is also equally as useful to anybody else with a .NET project that is using the Git as their source control, and want to make sure non-code extras that come with .NET projects don’t get checked in.
.gitignore File
This file specifies the paths and files to ignore in your project. Each line constitutes a new path, and each one can use basic RegEx to generalize the ignore checking.
To create the file run the following commands from your Git command prompt for windows use msysgit, or Linux and Mac OSX you can use the native command line for this.
touch .gitignore
{{ Add The Text In The Next Part }}
git add .gitignore
git commit -am "adding ignore checking paths for this project"
git push origin master
Or you can just create a file named “.gitignore” in notepad and save it and use your favorite Git client.
[Oo]bj/ [Bb]in/ *.suo *.user /TestResults *.vspscc *.vssscc
If you have any ignore statements that you find useful for your projects, I am interested in growing this file, so leave them down in the comments.
.NET, Git

Our typical setup:
obj
bin
_ReSharper.*
*.csproj.user
*.resharper.user
*.resharper
*.suo
*.cache
*~
*.swp
*.resharper.user
*.rptproj.user
*.db
I just started out with msysgit, and found out that when doing Silverlight development, adding *.xap to the list was a good idea.
This is the content of my .hgignore file (ok this is for mercurial, but i’m sue everyone can understand !)
#ignore files
glob:_ReSharper.*/
glob:TestResults/
glob:**/[bB]in/
glob:**/[oO]bj/
glob:*.suo
glob:**.vssscc
glob:**.vspscc
glob:**.ReSharper
glob:**.user
glob:**/[Ww]eb.config
glob:**/[Aa]pp.config
glob:UpgradeLog*.XML
glob:**/UpgradeReport*.*
glob:**.Publish.xml
It ignores Resharper files and directories, MSTest directories, and upgrade logs and reports.
it also ignores web.config and app.config so that devs can have their own (of course a web.template.config is available and included in the project). This could change with new web.config transformation capabilities in VS2010
Check out this stackoverflow post for some good ideas on file types to include http://stackoverflow.com/questions/2143956/gitignore-for-visual-studio-projects-and-solutions
Good post. The file is called “gitignore”. You have “getignore” above.
Thanks Rodney, I fixed that error on my part.
also ClientBin/