假设路径为/project/path/

cd /project/path
git config receive.denyCurrentBranch updateInstead

设定本仓库被远程push之后的行为

cd .git/hooks
echo -e '#!/bin/bash\n/usr/local/openresty/nginx/sbin/nginx -p /project/path -c /project/path/conf/deploy.conf -s reload' >> post-receive

设定为可执行

chmod a+x post-receive

设定本仓库本地pull之后的行为

cp post-receive post-merge

完工

相关文章:

  • 2021-05-30
  • 2021-08-04
  • 2022-12-23
  • 2021-04-14
  • 2021-12-04
  • 2021-10-31
  • 2022-12-23
猜你喜欢
  • 2021-07-05
  • 2021-11-08
  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
  • 2021-12-04
相关资源
相似解决方案