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.   

17 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. 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
  4. This comment has been removed by the author.

    ReplyDelete
  5. You’ve written a really great article here. Your writing style makes this material easy to understand.. I agree with some of the many points you have made. Thank you for this is real thought-provoking content
    Big data training in Velachery
    Big data training in Marathahalli
    Big data training in btm
    Big data training in Rajajinagar
    Big data training in bangalore

    ReplyDelete
  6. Thanks for such a great article here. I was searching for something like this for quite a long time and at last I’ve found it on your blog. It was definitely interesting for me to read  about their market situation nowadays.
    MEAN stack training in Chennai
    MEAN stack training in bangalore
    MEAN stack training in tambaram
    MEAN stack training in annanagar
    MEAN stack training in Velachery

    ReplyDelete
  7. I likable the posts and offbeat format you've got here! I’d wish many thanks for sharing your expertise and also the time it took to post!!
    python training in chennai
    python training in chennai
    python training in Bangalore

    ReplyDelete

  8. And indeed, I’m just always astounded concerning the remarkable things served by you. Some four facts on this page are undeniably the most effective I’ve had.

    slajobs reviews and complaints
    slajobs reviews and complaints
    slajobs reviews and complaints
    slajobs reviews and complaints
    slajobs reviews and complaints

    ReplyDelete
  9. Thanks, for such a great post. I have tried and found it really helpful. For more details to visit clat online coaching in Pune

    ReplyDelete
  10. This is very interesting information.
    jewellery erp software
    Jewellery erp software

    ReplyDelete