简体   繁体   中英

How to version ASP.NET MVC web application in git?

I have created an ASP.NET MVC 5.0 web application in Visual Studio 2015. I can see that there are a whole lot of files getting created. To version this project, what all are the files/directories do I need to commit in git? Which are to be excluded in .gitignore?

The rule of thumb is not to version control binaries and user specific files such as *.user , *.lock.json , /bin , /obj , /packages , folders.

You can use VisualStudio.gitignore file from this repository .

Don't forget to rename it to .gitignore .

This file is maintained by the community and contains all the reasonable ignore settings for .NET applications.

You need to add into repository webapp folder from your project, but you must to add in .gitignore file folders: bin & obj

Hope it helps;)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM