Answer the question
In order to leave comments, you need to log in
Git and Ftp..........?
Hello!
I have the following question.
Until today, I did not have to work with version control systems, but today there was a need for this system when working on 1 project.
The problem consists in the following, I work on the project 1 but by several machines. It's not very convenient to deploy a project on each machine, and then think about which machine the last changes were made to. I decided to try to work with GIT for version control, but the problem is that when changes are made to the project, it must be immediately updated on the working hosting.
Is there any way to organize the export from GitHub to FTP? If not, does anyone know of an alternative to this method? We need a collective approach to the development of the site, with an instant update on the hosting!
Thanks in advance for your reply!
Answer the question
In order to leave comments, you need to log in
Well, how? Did you succeed? I’m also thinking of implementing it this way, otherwise I won’t understand the meaning of such storages, I don’t need another backup ...
To date, there is such a solution - https://github.com/git-ftp/git-ftp/
It
is very simple to use:
$ cd my_git_tracked_project
$ git ftp push --user <user> --passwd <password> ftp://host.example.com/public_html
Usually this is done not via FTP, but via git push to the server (yes, this is not very good in terms of security). If you only have FTP, maybe this will do?
If I were you, I would use SVN rather than GIT for this task. Make a commit on the server "svn up ." from the working directory - voila, you're done! (:
You can read about hooks: book.git-scm.com/5_git_hooks.html , although there doesn't seem to be anything you need.
The simplest solution is git push && custom-script-to-update-ftp.
I don't know about git, but you can do it with mercurial. You need to install the mercurial server and add a hook to the repository on the server, so when pushing commits to the server, this hook will be called, which will update the working copy on the server from the same repository.
At my work, a backup of the repository to bitbucket is implemented in this way. After someone pushes to the server, these changes are pushed further by the hook to the bitbucket.
here is the solution for github:
writing.markchristian.org/how-to-deploy-your-code-from-github-automatic
automatically does a pull on the server every time you do a push
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question