简体   繁体   English

对多个FTP服务器的版本控制

[英]Version control over multiple FTP servers

I have a few PHP classes which I use on many web servers, using different hosting providers and therefore I've got only FTP access to them. 我有一些PHP类,可在许多Web服务器上使用,使用不同的托管提供程序,因此只能通过FTP访问它们。 I'm having a hard time updating the classes whenever I update the classes, needing to login on each ftp account and updating the files. 每当我更新类时,我都很难更新类,需要登录每个ftp帐户并更新文件。

Has anyone been through a similar situation and found a solution? 有没有人遇到过类似的情况并找到了解决方案?

The question is too broad, but since it's tagged git I'll look at it from this perspective. 这个问题太笼统了,但是因为它被标记为git所以我将从这个角度来看它。

If you maintain your website projects in Git, or maintain your class library (or whatever it is in PHP) in Git, you could use a specialized Git → FTP tool, git-ftp , which can be used to update remote directories via FTP from Git repositories. 如果您在Git中维护您的网站项目,或者在Git中维护您的类库(或PHP中的类库),则可以使用专用的Git→FTP工具git-ftp ,该工具可用于通过FTP从以下位置更新远程目录: Git存储库。 It works by keeping a file in the remote directory which records the commit ID with which the last synchronisation has been made, so the next synchronisation will only update/delete/modify those files/directories which have been actually changed. 它的工作方式是将文件保存在远程目录中,该文件记录了进行了上次同步的提交ID,因此下一次同步将仅更新/删除/修改实际已更改的文件/目录。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM