Search This Blog

2012-03-26

My git ignore for ASP.NET

For those how use git Source Code Management for .NET/ASP.NET solutions there is a start-up routine to add irrelevant files and folders to ignore list. Just to make life easier I tried to create my own list based on common needs. 
First, we usually don't need bin and obj folder since we are interested in sources only; Visual Studio and Resharper files: *.suo, *.user*cache, _ReSharper*. If you use NuGet and NuGet Package Restore you are probably not interested in packages folder.
Another very controversial issue is to ignore upgrade and backup files after solution migration, but usually I don't need them as well :-): UpgradeLog.XML_UpgradeReport_FilesBackup.
Great TDD tools like NCrunch and NSubstitute could help you a lot, but  *.ncrunchproject*.ncrunchsolution, *NSubstitute* files might be ignored.
Finally, my .gitignore:
bin/
obj/
packages/
*.suo
*.user
*cache
_ReSharper*

*NSubstitute*

*.ncrunchproject
*.ncrunchsolution

UpgradeLog.XML
_UpgradeReport_Files
Backup
Obviously the list is not generic and could not be recommended for all projects, but at least it is useful for small and medium open-source solutions to keep sources clean and size-optimized.   

12 comments:

  1. There is a robust .gitignore for visual studio on github: https://github.com/github/gitignore/blob/master/Global/VisualStudio.gitignore

    ReplyDelete
  2. nice sharing. u may find .gitignore is not working. see how to fix at tahSin's gaRage.

    ReplyDelete
  3. Really interesting content which is unique which provided me the required information.
    Dot Net Training in Chennai | .Net training in Chennai | FITA Training | FITA Velachery .

    ReplyDelete
  4. Well Said, you have furnished the right information that will be useful to anyone at all time. Thanks for sharing your Ideas.
    Python Training in Chennai | Python Course in Chennai

    ReplyDelete
  5. This technical post helps me to improve my skills set, thanks for this wonder article I expect your upcoming blog, so keep sharing...
    web designing training|web designing training in chennai

    ReplyDelete
  6. This comment has been removed by the author.

    ReplyDelete
  7. It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
    Android Training in Chennai
    Ios Training in Chennai

    ReplyDelete