linux - 如何编辑 Apache 配置以使 git pull 的更改不会立即反射(reflect)出来?

标签 linux git apache shell

我想在 Linux 上编辑 Apache 配置,这样每次 git pull 的更改都不会立即反射(reflect)出来。

我希望它仅在 Apache 重新启动后才暂存。

最好的方法是什么?

最佳答案

我不会更改 Apache 配置,而是更改 Apache 管理的内容。

它可以显示 git 存储库的内容,但那不应该是完成更改的地方。

你可以有两个仓库:

  • 一个是为了改变
  • 一个用于在 Apache 重新启动时反射(reflect)更改(即,从第一个开始的 git pull)

即:

git clone first/repo path/to/second/repo
# make Apache serve path/to/second/repo

重启Apache时,在apachectl start之前添加:

cd path/to/second/repo
git pull

关于linux - 如何编辑 Apache 配置以使 git pull 的更改不会立即反射(reflect)出来?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37853008/

相关文章:

java - Linux 如何将文件识别为某种文件类型,以及如何以编程方式更改它?

json - 如何从 shell 脚本向 JSON 文件添加新元素

Git 发布具有大量 NuGet 依赖项的 Azure 网站

php - Ubuntu 14.04 服务器 : Apache2 issue with phpMyAdmin

linux - Linux Ubuntu 上的 OTRS 单点登录 (SSO)

linux - .bash_aliases 中的 ls 别名干扰 egrep 输出

git - 为单个 git 提交覆盖已配置的用户

git - 我应该将 master merge 到一个分支,然后再 merge 回 master 吗?

linux - 通过 Apache 远程访问 JBOSS 管理控制台

linux - RHEL 6 上的 postgres 10.5 安装问题