Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git and ASP MVC

Anyone know of good articles for setting up a new project with git and ASP.NET MVC?

Just wondering what to include and ignore and what to do about deployment.

like image 363
user77339 Avatar asked Mar 12 '09 17:03

user77339


People also ask

What is git MVC?

Git is the preferred version control system of most developers and enterprises because it stores file changes more efficiently and better ensures better file integrity. Git also allows developers to easily collaborate; they can download a new version of the software, make changes, and upload the newest revision.

What is Git in asp net?

Git is a free and open source distributed. version control system designed to handle. everything from small to very large projects. with speed and efficiency. Created by Linux creator, Linus Torvalds.

Can we host ASP Net website on GitHub?

Now that you can run . NET web applications without server-side code, you can deploy these applications to various static site hosts, such as Azure Static Web Apps and GitHub Pages.


3 Answers

Gitignore

You asked about what to ignore -- here is my default .gitignore for ASP.NET MVC projects:

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

Setting up a new project

For help on setting up a new project, I would install msysgit since you're most likely on Windows and check out learn.github to learn about getting started with git. Of course, the master (Skeet) suggests you do most everything from the console -- and I tend to agree with him. Git is just easier that way IMHO. If you'd like a handy git reference, check out the git reference.

Deployments

As somebody else already mentioned -- check out AppHarbor for deployments. Those guys aim to be the 'Heroku of ASP.NET'.

like image 138
Dan Esparza Avatar answered Oct 17 '22 23:10

Dan Esparza


There is a great post on codebetter.com today. It is about OSS projects but I bet it is applicable to you as well because it is describing GIT.

The right part of the article is the link to Kyle's blog and especially Getting Started with Git and GitHub on Windows.

like image 38
David Pokluda Avatar answered Oct 17 '22 22:10

David Pokluda


If you're already using git and ASP MVC you should also check out AppHarbor http://appharbor.com/ for deployment and hosting. It integrates right into your workflow.

like image 25
Dan Avatar answered Oct 17 '22 22:10

Dan