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

问题描述

我相信 git ftp 支持是最近才添加的,但 git push 文档 do 明确指出Git 原生支持 ssh、git、http、https、ftp、ftps 和 rsync 协议."(强调)

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)

但是,其他人问如果 git 无法推送到 ftp 怎么办服务器,我也遇到了同样的问题.

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

那么——谁能明确说明git push"是否适用于 ftp 协议?

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

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

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

如果没有...这是在工作中,还是我应该查看 git-ftp?

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

我在 Windows 下使用 git 1.7.3.1.

I'm using git 1.7.3.1 under Windows.

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

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 ...)

推荐答案

不,Git 不支持推送到 FTP 服务器,仅克隆和获取.这是以前回答过的.

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

但是有几种工具可以将您的代码上传到支持 Git 的 FTP 服务器.

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

  • Git-ftp - 上传当前提交的 shell 脚本.它存储最后上传的提交 ID 并仅上传更改的文件.
  • ezyang/git-ftp - 也可以上传提交的 python 脚本.它带有一个接收后挂钩,可以从裸存储库进行部署.但最后一次提交已超过三年.
  • PHPloy - 一个 php 脚本,它还通过存储提交 ID 仅上传更改的文件.
  • Grunt-git-ftp - 只上传更改文件的 Grunt 脚本也一样.
  • 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 服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-23 14:21