How to use GIT connected on the server?

8

I've been looking for some time on how I could replace my filezilla and got some answers that it's possible to use git as an intermediate so I can run my site / project according to what's in that repository .

I also found a article about DeployBot no tableless ", but I was not able to understand very well the definition of deploy and use of such tool! is there any way to connect a repository to a server and abandon the FTP client?

    
asked by anonymous 05.10.2015 / 17:17

3 answers

4

Yes, and you should do this, abandon FTP instead.

But the main question should be, and how is it done?

Git is a SCM (Source Control Management) tool, that is, a tool for controlling your code, versioning, tagging, history and everything legal that this type of tool can deliver, for legal I mean essential, make use of it, live in danger of losing the code and have nowhere to look after is crazy, not to mention other points. I will not dwell on this, because I could raise a lot of reasons to use it.

But only using SCM does not completely solve your problem of using FTP to deploy. Yes, deploy, you already do this process without knowing the term. It's nothing more than you upload your changes to your server, the moment you did this, you just did a deploy. But this is a very annoying process when manual, is not it? Yes, it's boring and always the same, so there are a lot of tools to do this automated way for you, integration servers keep your changes up for you, and that's great because you will be much faster in your development and will stop of wasting time on repeatable, error prone tasks.

But this is a really great subject, I went over and did not teach with a hands-on, only superficial theory. So I recommend you read about Continuous Integration, and how to implement it. This is sure to change your development process, of course, for much better.

    
06.10.2015 / 00:31
1

Use a continuous integration server, and then make the git code call.

So, configure a pipeline that in the final process (deploy) will send the pro server code that is used.

    
13.10.2015 / 02:28
0

Using Git on the production server is not a good practice! As @guiandmag wrote you should implement a deploy process. Since it is not your source that should go to production, but the binary or final code or etc ...

A good reference to why not use / install Git on a production server: link

    
06.10.2015 / 17:44