【发布时间】:2012-10-23 16:34:31
【问题描述】:
假设我有一个应用程序的本地副本,我将其推送到 github,然后使用 git-ftp 将任何更改上传到我的服务器。
我会首先使用:
$ git ftp init -u <user> -p - ftp://host.example.com/public_html
这会将我所有的文件上传到服务器并使用git push 进行以后的上传,对吗?
但是如果我的服务器上已经有一个副本并且想要在本地设置它怎么办?我尝试下载我的应用程序文件,使用 git init,将所有内容推送到 github,然后当我尝试使用 git ftp push 时收到此错误:
fatal: Could not get last commit. Network down? Wrong URL? Use 'git ftp init' for the inital push., exiting...
然后我使用了git ftp init 命令,它成功了,但它重新上传了所有内容。
有没有什么方法可以设置它而无需重新上传所有内容并开始使用git ftp push?
【问题讨论】:
标签: git version-control github git-ftp