GIT支持是否推送到FTP服务器? [英] Does GIT support push to an ftp server?

查看:130
本文介绍了GIT支持是否推送到FTP服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我认为git ftp支持是最近的一个新增功能,但git push docs do 明确指出:Git本身支持ssh,git,http,https, ftp ,ftps和rsync协议。 (强调加)

然而,其他人已经询问如果 git无法推送到ftp服务器,并且我遇到了完全相同的问题。



任何人都明确说明git push是否适用于ftp协议?

如果是...那么任何人都可以回答那个问题? : - )



如果没有...这是在做什么,或者我应该看看git-ftp?



我在Windows下使用git 1.7.3.1。



非常感谢任何信息或建议! (顺便说一句,我有这个问题都很好的超链接,但作为一个低级别的我只有一个链接,所以不得不删除其他人...)

解决方案

不,Git不支持推送到FTP服务器,只克隆和抓取。这是以前的回答



但是有几种工具可以将您的代码上传到使用Git的FTP服务器。




  • Git-ftp - 一个上传你当前提交的shell脚本。它存储上次上传的提交ID并仅上传更改后的文件。 ezyang / git-ftp - 一个上传提交的python脚本。它带有一个post-receive钩子,可以从裸仓库进行部署。但最后一次提交已超过三年。

  • PHPloy - 一个php脚本,它还通过存储提交ID来上传仅更改的文件。

  • Grunt-git-ftp - 一个只上传更改文件的Grunt脚本。


  • I believe git ftp support is a somewhat recent addition, but the git push docs do clearly state that "Git natively supports ssh, git, http, https, ftp, ftps, and rsync protocols." (emphasis added)

    However, others have asked what to do if git fails to push to ftp server, and I am having exactly the same problem.

    So -- can anyone definitively state whether or not "git push" works with the ftp protocol?

    If yes ... then can anyone answer that other question? :-)

    If no ... is this in the works, or should I be looking at git-ftp?

    I'm using git 1.7.3.1 under Windows.

    Many thanks for any info or advice! (BTW, I had this question all nicely hyperlinked, but as a lowly 1-rank I only get one link, so had to remove the others ...)

    解决方案

    No, Git does not support a push to an FTP server, only clone and fetch. This was previously answered.

    But there are several tools to upload your code to an FTP server that work with Git.

    • Git-ftp - A shell script that uploads your current commit. It stores the last uploaded commit id and uploads only changed files.
    • ezyang/git-ftp - A python script that uploads commits as well. It comes with a post-receive hook to deploy from a bare repository. But the last commit is more than three years old.
    • PHPloy - A php script that also uploads only changed files by storing the commit id.
    • Grunt-git-ftp - A Grunt script that uploads only changed files as well.

    这篇关于GIT支持是否推送到FTP服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆