How to use GIT connected to the server?

Asked

Viewed 477 times

8

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

I also found a article on the DeployBot in the tableless, however I could not understand very well what the definition of deploy and use of such a tool! there is some way to connect a repository with a server and abandon the FTP client once and for all?

  • Tip: if you understand English, I strongly recommend you in this GIT course: https://www.codeschool.com/courses/try-git and while deploy is very complicated, it all depends on the project, I started with Capistrano which is great for Ruby on Rails.

3 answers

4


Yes, and you should do that, abandon FTP once and for all.

But the main question must be, and how do you do it?

Git is a SCM (Source Control Management) tool, which is a tool for controlling your code, versioning, tag, history, and everything that this kind of tool can deliver, by legal I mean essential, make use of it, live with the danger of losing the code and have no place to look for afterwards is crazy, not to mention other points. I will not delve into this, because it could raise numerous reasons to use it.

But just using SCM doesn’t completely solve your FTP problem to deploy. Yes, deploy, you already do this process without knowing the term. It’s nothing but you upload your changes to your server, at the time you did this, you just deploy. But this is a very boring process when manual, isn’t it? Yes, it’s boring and always the same, so there are many tools to do this in an automated way for you, continuous integration servers that raise your changes to you, and that’s great because you’ll be much faster in your development and will stop wasting time on repeatable and error-prone tasks.

But this is a really big subject, I passed well over and did not teach with a hands-on, only superficial theory. That’s why I recommend you read about Continuing Integration, and how to implement it. This will surely change your development process, of course, for much better.

  • I understood perfectly what you said, but I would like references on how to use the git system to send the files to the server understand?

  • 1

    Which technology stack do you use? Java, Javascript, PHP, Python...

  • PHP-only use.

  • 1

    Okay, I just need one more piece of information. You host your site on a physical server or some cloud server?

  • conventional server (cloud)

  • 1

    If it’s on a cloud server, you can use a hosted service to do all of your project’s Deployment. Here are some: - Travis - Snap-CI -Codeship. Each one of them has its own peculiarity, I recommend that you read the documentation of each one in the part of Deployments to see to go up to your cloud folder.

  • Not to be annoying, but I think you could put those last tools you mentioned in your answer. I didn’t find it clear enough to answer the question clearly. I thought you wrote too much and said little #soacho.

Show 2 more comments

1

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

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

0

Browser other questions tagged

You are not signed in. Login or sign up in order to post.