gpt4 book ai didi

linux - 将 git repo 从 public_html/stage 文件夹移动到根 public_html/

转载 作者:太空宇宙 更新时间:2023-11-04 09:30:26 25 4
gpt4 key购买 nike

在我的 Linux 服务器上,我有一个在 public_html/stage 中运行的网站,我从 guthub 克隆到/stage 文件夹。

开发结束后,我想将此文件夹移动到根目录,即 public_html 文件夹,确保它与我的 repo 同步。

我尝试将所有/stage 文件复制到根目录,但未复制主文件夹/app。

请指导我如何将这个暂存阶段转移到生产阶段。

另外请让我知道这样做的标准方法是什么?

最佳答案

它们只是文件,您可以复制它们。

cd /path/to/public_html
cp -r stage/* .

确保不要复制您的 Git 存储库,.git 目录。如果你这样做了,那会将 public_html/ 变成一个 Git 存储库。

如果您确实想将整个存储库移动到public_html 中,同样它只是文件。 git 需要的一切都在 stage/.git/ 中。

关于linux - 将 git repo 从 public_html/stage 文件夹移动到根 public_html/,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32176020/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com