简体   繁体   English

将 git 存储库克隆到 FTP 服务器

[英]clone git repository to an FTP server

I've done quite a bit of searching on Stackoverflow and on various websites and can't seem to find a quick answer on how to clone a git repository from my local machine to an FTP server.我已经在 Stackoverflow 和各种网站上进行了大量搜索,但似乎无法找到有关如何将 git 存储库从本地计算机克隆到 FTP 服务器的快速答案。

I'm working with Ubuntu 10.04 LTS.我正在使用 Ubuntu 10.04 LTS。 Also my webapp is being run on Heroku.我的 webapp 也在 Heroku 上运行。

You don't clone a repository to a remote place, but from a remote place to your system .您不会将存储库克隆远程位置,而是远程位置克隆到您的系统

If you want your repository on a FTP server, upload it by hand using an FTP client, and push your future commits by referring its FTP url.如果您希望您的存储库在 FTP 服务器上,请使用 FTP 客户端手动上传它,并通过引用其 FTP url 来推送您未来的提交。

On course, if you have SSH access to your server, you can also log in it, and clone from there.当然,如果您可以通过 SSH 访问您的服务器,您也可以登录它,然后从那里进行克隆。

Important note:重要提示:

don't forget to do a git update-server-info before uploading the repository to your ftp server在将存储库上传到您的 ftp 服务器之前,不要忘记执行git update-server-info

and maybe adding it to a post-update script so that your info/refs file is current !并可能将其添加到post-update脚本中,以便您的info/refs文件是最新的!

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

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