Instantly share code, notes, and snippets.

Embed
What would you like to do?
.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
@Assiance

This comment has been minimized.

Assiance commented Dec 6, 2014

Thanks. You saved me some time

@AvetisG

This comment has been minimized.

AvetisG commented May 2, 2015

Thank you very much for this resource!

@jesslilly

This comment has been minimized.

jesslilly commented May 20, 2015

This is awesome. Thanksyou. You can also get a good gitignore file by using the Team Explorer view in Visual Studio. Go to the repo, go to settings, and if you do not have a .gitignore already, you can create one which looks similar to this gist.

@claudiobernasconi

This comment has been minimized.

claudiobernasconi commented Jul 7, 2015

Thank you for sharing. It works as expected for ASP.NET MVC 4 applications.

@ghost

This comment has been minimized.

ghost commented Nov 5, 2015

Thank you!

@hamerm

This comment has been minimized.

hamerm commented Nov 17, 2015

Cool, thanks!

@xitsolutions

This comment has been minimized.

xitsolutions commented May 19, 2016

Awesome! Cheers!

@prystoynyy

This comment has been minimized.

prystoynyy commented Jun 14, 2016

Good job!

@imAliAsad

This comment has been minimized.

imAliAsad commented Jun 19, 2016

Thank you bro. it helped

@carios23

This comment has been minimized.

carios23 commented Jul 27, 2016

Gracias!

@OswaldoMartinezMendez

This comment has been minimized.

OswaldoMartinezMendez commented Aug 6, 2016

Muchas gracias

@lourenco-lima-cunha

This comment has been minimized.

lourenco-lima-cunha commented Oct 21, 2016

Thanks!

@ManGysT

This comment has been minimized.

ManGysT commented Nov 6, 2016

Thank you very much=)

@sangimed

This comment has been minimized.

sangimed commented Nov 21, 2016

Thanks I'm gonna try it for a university project.

@bytesoftly

This comment has been minimized.

bytesoftly commented Jan 2, 2017

Would add .vs/ in there too (for ignoring Visual Studio config/temp dirs)

@AbhimanyuAryan

This comment has been minimized.

AbhimanyuAryan commented Jan 29, 2017

will this work with asp dotnet core MVC project as well?

@yvsssantosh

This comment has been minimized.

yvsssantosh commented Mar 6, 2017

Awesome!

@FreezeSoul

This comment has been minimized.

FreezeSoul commented Mar 7, 2017

Thank you!

@josealvarez97

This comment has been minimized.

josealvarez97 commented Mar 10, 2017

Thanks body! 💯

@danishjafri

This comment has been minimized.

danishjafri commented Aug 17, 2017

Amazing, thank you!

@neoandeson

This comment has been minimized.

neoandeson commented Aug 22, 2017

Thank you very much!

@welkie

This comment has been minimized.

welkie commented Sep 6, 2017

Does this work well for ASP.NET Web API projects too?

@Maransatto

This comment has been minimized.

Maransatto commented Sep 9, 2017

Obrigado!!! (in portuguese)

@bcdbuddy

This comment has been minimized.

bcdbuddy commented Oct 20, 2017

exactly what I was looking for! thanks!

@buddhika85

This comment has been minimized.

buddhika85 commented Aug 5, 2018

Thanks

@hasanfar

This comment has been minimized.

hasanfar commented Aug 5, 2018

very helpful. Thanks!

@theprajwal

This comment has been minimized.

theprajwal commented Aug 12, 2018

Thanks...

@BrentACole

This comment has been minimized.

BrentACole commented Sep 14, 2018

Thanks!

@wfaria

This comment has been minimized.

wfaria commented Sep 25, 2018

Thanks!

@andy51002000

This comment has been minimized.

andy51002000 commented Oct 27, 2018

Thanks~

@brunocicom

This comment has been minimized.

brunocicom commented Nov 29, 2018

Very helpful. Thanks.

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