.gitignore Config File For .NET Projects

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.


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.

Nick Berardi

In charge of Cloud Drive Desktop at @Amazon, Entrepreneur, Microsoft MVP, ASPInsider, co-founder and CTO of @CaddioApp, Father, and @SeriouslyOpen host