asp.net-mvc - git 和 ASP MVC

标签 asp.net-mvc git gitignore

有人知道关于使用 gitASP.NET MVC 设置新项目的好文章吗?

只是想知道要包含什么和忽略以及如何部署。

最佳答案

Gitignore

您询问了要忽略的内容——这是我对 ASP.NET MVC 项目的默认 .gitignore:

###################
# 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

设置新项目

要获得有关设置新项目的帮助,我会安装 msysgit因为你很可能在 Windows 上查看 learn.github了解如何开始使用 git。 当然是高手(双向飞碟)suggests you do most everything from the console ——我倾向于同意他的观点。恕我直言,Git 更容易。如果你想要一个方便的 git 引用,请查看 git reference .

部署

正如其他人已经提到的——查看 AppHarbor用于部署。这些人的目标是成为“ASP.NET 的 Heroku”。

关于asp.net-mvc - git 和 ASP MVC,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/639647/

相关文章:

git - 忽略的文件在“提交更改”窗口中仍然可见 - IntelliJ 13

gitignore 除 xml 文件之外的所有子目录中的所有文件

jquery - 从 MVC 模型获取文本到 jQuery 时的本地化问题

c# - ASP.NET Core 2.1 [FromQuery] 没有获取参数

git - 在分支 checkout 之间保留 git --assume-unchanged 文件

git - 为什么管理员不能在gitlab中将自己添加到项目成员中?

sql-server-2005 - 对 SQL Server 进行版本控制?

asp.net-mvc - 在 MVC6 项目中生成 AssemblyInfo 文件

javascript - 如何从 ASP.NET MVC 中的另一个 View 修改共享layout.cshtml中的image.OnClick?

git - .gitignore 排除规则实际上是如何工作的?