Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git vs FTP for web deployment [closed]

I know what git is for and how to use it, (a little bit) but there is one concept I still don’t fully understand. I have heard a lot of web developers lately saying that they use git for every web project even though they are not collaborating, they just use git as an FTP alternative, in fact they claim that FTP is an old method to upload your sites.

My question is, how could I use git to upload my site without having to pay for a service such as beanstalk?

Is really FTP considered an old technology and we should be using git?

Thanks a lot

like image 473
fs_tigre Avatar asked Feb 15 '13 02:02

fs_tigre


2 Answers

Using your favourite version control is the only sensible way to deploy anything.

Git is not only about collaboration and distributed VCS it is also a serverless VCS (by definition) - so you can deploy from your dev machine to your deployment target.

To summarise when setup properly to deploy your changes is as simple as;

git push hub master

For more information A web-focused Git workflow and Using Git for Deployment

I'm not going to answer the subjective bit of the question; there are a myriad of reasons why I'd deprecate FTP - but it is a valid way of transferring files as long as you understand the limitations of the technology.

I will however say that you absolutely must be using version control within your deployment strategy.

like image 161
Richard Harrison Avatar answered Nov 19 '22 21:11

Richard Harrison


See the following links for instructions on how to deploy a Git repo to your server:

  • Deploy your site with git
  • How to deploy your code from GitHub automatically
  • A web-focused Git workflow
like image 40
Jeff Miller Avatar answered Nov 19 '22 21:11

Jeff Miller