通过 ftp 部署 git 个文件 git 还能在实时服务器上运行吗?
Deploy git files via ftp can git still functions on live server?
我正在使用 Git 来跟踪我的项目,我通常做的是在实时服务器中克隆 git 项目,然后从 localhost
或 pull
进行推送来自实时服务器。
现在,我想知道是否可以从我的实时服务器 git 推送,我 ftp 通过 FTP 客户端传输文件。
例如我有一个文件夹 git-test
,里面有 .git
个文件,然后,
我 ftp git-test
使用传输文件夹到实时服务器。
实时服务器在 git-test
文件夹中仍会有 .git
。
- 问题是如果这样做 git 功能是否仍然有效
方式?
- 如果可行,那么这两种方法有什么区别?哪一个是最佳实践?
The question is does the git functions still work if doing it this way?
git 在服务器上 运行 就好了,因为它会将嵌套的文件夹识别为 repo。git。
你可以考虑用git-ftp这样的工具来传输,比一个一个文件传输更安全。
如果您不使用该工具,那么更好的做法(使用 ftp)是使用 git bundle
:这意味着传输 一个 文件(您可以从中 git 在服务器上克隆)。
参见“Backup a GitHub repository”。
注意:使用 ftp 不再被视为 "best practice"(参见 its multiple security concerns)。
使用 git 是一种可能的解决方案,这就是 and push-to-checkout
.
的原因
我正在使用 Git 来跟踪我的项目,我通常做的是在实时服务器中克隆 git 项目,然后从 localhost
或 pull
进行推送来自实时服务器。
现在,我想知道是否可以从我的实时服务器 git 推送,我 ftp 通过 FTP 客户端传输文件。
例如我有一个文件夹 git-test
,里面有 .git
个文件,然后,
我 ftp git-test
使用传输文件夹到实时服务器。
实时服务器在 git-test
文件夹中仍会有 .git
。
- 问题是如果这样做 git 功能是否仍然有效 方式?
- 如果可行,那么这两种方法有什么区别?哪一个是最佳实践?
The question is does the git functions still work if doing it this way?
git 在服务器上 运行 就好了,因为它会将嵌套的文件夹识别为 repo。git。
你可以考虑用git-ftp这样的工具来传输,比一个一个文件传输更安全。
如果您不使用该工具,那么更好的做法(使用 ftp)是使用 git bundle
:这意味着传输 一个 文件(您可以从中 git 在服务器上克隆)。
参见“Backup a GitHub repository”。
注意:使用 ftp 不再被视为 "best practice"(参见 its multiple security concerns)。
使用 git 是一种可能的解决方案,这就是 push-to-checkout
.