git和ASP MVC

时间:2009-03-12 17:28:22

标签: asp.net-mvc git gitignore

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

只是想知道要包含什么和ignore以及如何处理部署。

5 个答案:

答案 0 :(得分:36)

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入门。 当然,主人(Skeet)suggests you do most everything from the console - 我倾向于同意他的观点。 GIT就这么简单恕我直言。如果您想要一个方便的git参考,请查看git reference

部署

正如其他人已经提到的那样 - 请查看AppHarbor部署。那些家伙的目标是成为“ASP.NET的Heroku”。

答案 1 :(得分:4)

今天codebetter.com有一篇很棒的帖子。这是关于OSS项目,但我敢打赌它也适用于你,因为它描述了GIT。

文章的右侧部分是指向Kyle's blog的链接,尤其是Getting Started with Git and GitHub on Windows

答案 2 :(得分:3)

如果您已经在使用git和ASP MVC,那么您还应该查看AppHarbor http://appharbor.com/以进行部署和托管。它集成到您​​的工作流程中。

答案 3 :(得分:0)

答案 4 :(得分:0)

我的超级简单:

*/packages/*
/packages/*
obj/
bin/
TestResults/
_ReSharper.*
*.csproj.user
*.resharper.user
*.resharper
*.suo
*.cache
*~
*.swp
*.resharper.user
*.rptproj.user
*.db
*.sdf
*.tmp

对于gitignore文件的示例,请检查github gitignore examples和一个用于visual studio VisualStudio.gitignore