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.

Copy link

Assiance commented Dec 6, 2014

Thanks. You saved me some time

@AvetisG

This comment has been minimized.

Copy link

AvetisG commented May 2, 2015

Thank you very much for this resource!

@jesslilly

This comment has been minimized.

Copy link

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.

Copy link

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.

Copy link

ghost commented Nov 5, 2015

Thank you!

@hamerm

This comment has been minimized.

Copy link

hamerm commented Nov 17, 2015

Cool, thanks!

@xitsolutions

This comment has been minimized.

Copy link

xitsolutions commented May 19, 2016

Awesome! Cheers!

@prystoynyy

This comment has been minimized.

Copy link

prystoynyy commented Jun 14, 2016

Good job!

@imAliAsad

This comment has been minimized.

Copy link

imAliAsad commented Jun 19, 2016

Thank you bro. it helped

@carios23

This comment has been minimized.

Copy link

carios23 commented Jul 27, 2016

Gracias!

@OswaldoMartinezMendez

This comment has been minimized.

Copy link

OswaldoMartinezMendez commented Aug 6, 2016

Muchas gracias

@lourenco-lima-cunha

This comment has been minimized.

Copy link

lourenco-lima-cunha commented Oct 21, 2016

Thanks!

@ManGysT

This comment has been minimized.

Copy link

ManGysT commented Nov 6, 2016

Thank you very much=)

@sangimed

This comment has been minimized.

Copy link

sangimed commented Nov 21, 2016

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

@bytesoftly

This comment has been minimized.

Copy link

bytesoftly commented Jan 2, 2017

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

@AbhimanyuAryan

This comment has been minimized.

Copy link

AbhimanyuAryan commented Jan 29, 2017

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

@yvsssantosh

This comment has been minimized.

Copy link

yvsssantosh commented Mar 6, 2017

Awesome!

@FreezeSoul

This comment has been minimized.

Copy link

FreezeSoul commented Mar 7, 2017

Thank you!

@josealvarez97

This comment has been minimized.

Copy link

josealvarez97 commented Mar 10, 2017

Thanks body! 💯

@danishjafri

This comment has been minimized.

Copy link

danishjafri commented Aug 17, 2017

Amazing, thank you!

@neoandeson

This comment has been minimized.

Copy link

neoandeson commented Aug 22, 2017

Thank you very much!

@welkie

This comment has been minimized.

Copy link

welkie commented Sep 6, 2017

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

@Maransatto

This comment has been minimized.

Copy link

Maransatto commented Sep 9, 2017

Obrigado!!! (in portuguese)

@bcdbuddy

This comment has been minimized.

Copy link

bcdbuddy commented Oct 20, 2017

exactly what I was looking for! thanks!

@buddhika85

This comment has been minimized.

Copy link

buddhika85 commented Aug 5, 2018

Thanks

@hasanfar

This comment has been minimized.

Copy link

hasanfar commented Aug 5, 2018

very helpful. Thanks!

@theprajwal

This comment has been minimized.

Copy link

theprajwal commented Aug 12, 2018

Thanks...

@BrentACole

This comment has been minimized.

Copy link

BrentACole commented Sep 14, 2018

Thanks!

@wfaria

This comment has been minimized.

Copy link

wfaria commented Sep 25, 2018

Thanks!

@andy51002000

This comment has been minimized.

Copy link

andy51002000 commented Oct 27, 2018

Thanks~

@brunocicom

This comment has been minimized.

Copy link

brunocicom commented Nov 29, 2018

Very helpful. Thanks.

@kri-kan

This comment has been minimized.

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

This comment has been minimized.

Copy link

StevenBegin commented Feb 18, 2019

Thanks! 👍

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