Skip to content

Instantly share code, notes, and snippets.

@indyfromoz
Created November 19, 2012 06:44
Show Gist options
  • Save indyfromoz/4109296 to your computer and use it in GitHub Desktop.
Save indyfromoz/4109296 to your computer and use it in GitHub Desktop.
.Gitignore for ASP.NET MVC
###################
# compiled source #
###################
*.com
*.class
*.dll
*.exe
*.pdb
*.dll.config
*.cache
*.suo
# Include dlls if they’re in the NuGet packages directory
!/packages/*/lib/*.dll
!/packages/*/lib/*/*.dll
# Include dlls if they're in the CommonReferences directory
!*CommonReferences/*.dll
####################
# VS Upgrade stuff #
####################
UpgradeLog.XML
_UpgradeReport_Files/
###############
# Directories #
###############
bin/
obj/
TestResults/
###################
# Web publish log #
###################
*.Publish.xml
#############
# Resharper #
#############
/_ReSharper.*
*.ReSharper.*
############
# Packages #
############
# it’s better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip
######################
# Logs and databases #
######################
*.log
*.sqlite
# OS generated files #
######################
.DS_Store?
ehthumbs.db
Icon?
Thumbs.db
[Bb]in
[Oo]bj
[Tt]est[Rr]esults
*.suo
*.user
*.[Cc]ache
*[Rr]esharper*
packages
NuGet.exe
_[Ss]cripts
*.exe
*.dll
*.nupkg
*.ncrunchsolution
*.dot[Cc]over
@brunocicom
Copy link

Very helpful. Thanks.

@kri-kan
Copy link

kri-kan commented Dec 24, 2018

Can we commit PublishProfiles folder into source control.. As you haven'e added that to ignore list.

@StevenBegin
Copy link

Thanks! 👍

@CleiberReis
Copy link

Thanks!

@rintaromasuda
Copy link

Amazing! Thanks!

@taylorchasewhite
Copy link

Thanks!

@franciscc
Copy link

Thank you!

@dprutkevich
Copy link

thank you, it works

@monkymn
Copy link

monkymn commented Sep 5, 2019

Muchas Gracias! 👍

@faustog94
Copy link

Thanks you!

@ricardosaracino
Copy link

should add .idea for Rider

@gregor-tusar
Copy link

Does not the second *.dll (line 72) and packages (line 68) under # OS generated files # override whole this section (lines 12-16):

# Include dlls if they’re in the NuGet packages directory
!/packages/*/lib/*.dll
!/packages/*/lib/*/*.dll
# Include dlls if they're in the CommonReferences directory
!*CommonReferences/*.dll

?

@mohammad007kh
Copy link

Thanks!

@sametakbal
Copy link

Thank you !

@hoangngoclam
Copy link

Thanks you very much ^_^

@Mateushrr
Copy link

Thx so much!

@thestillwaters
Copy link

Thx so much, your way is better than lfs.

@cristianlatapiat
Copy link

Excelente Aporte , Muchas gracias.

@LassazVegaz
Copy link

Thank you

@bantya
Copy link

bantya commented Jan 15, 2021

Thanks a ton.. 🙌🏽

@rickluo94
Copy link

Thank you!!!

@rmohan20195
Copy link

Thank you very much, saved my day. 👍

@Knerbel
Copy link

Knerbel commented Jun 23, 2021

Thanks!

@ajru
Copy link

ajru commented Sep 1, 2021

Thanks , saved my time

@Troxar
Copy link

Troxar commented Oct 5, 2021

Thx!

@quyetkaito68
Copy link

Thank you - Cám ơn rất nhiều

@vicdant1
Copy link

vicdant1 commented Mar 5, 2022

Thank you sir :)

Hugs from Brazil 🇧🇷

@eugene-sh
Copy link

Thanks! 😊

@lemon5043
Copy link

Thanks!

@MohammedMazher1
Copy link

Thanks.....

@erikyuzwa
Copy link

Thanks so much - 2023 and it's a mystery why the dotnet new cli tool doesn't autogenerate a .gitignore to use 🤷

@mohammad-ayeshh
Copy link

ty

@TomsBack
Copy link

thaaaanks

@MohammedMazher1
Copy link

Thanks..

@vicdant1
Copy link

Hey guys, I've been recieven notifications from this post and I want to share with you a tip: instead of using this .gitignore, begin using dotnet new gitignore, cli will create a file like this and you guys don't need to come back in this gist in order to upload a new dotnet project to a git based versioning system.

@erikyuzwa
Copy link

Hey guys, I've been recieven notifications from this post and I want to share with you a tip: instead of using this .gitignore, begin using dotnet new gitignore, cli will create a file like this and you guys don't need to come back in this gist in order to upload a new dotnet project to a git based versioning system.

THIS IS BRILLIANT! Thanks for the tip @vicdant1 ❤️ 🚀

@daveleee
Copy link

Thank youuu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment