标签:hooks
问题 1.使用默认git-shell的hooks,如果更改post-receive,所有的文件都会更新所有 现在只能这样做了 ln -s /opt/git/gitlab-shell/hooks/pre-receive pre-receive ln -s /opt/git/gitlab-shell/hooks/update update cat post-receive #!/bin/bash web_dir=/opt/xx/xx/ git --work-tree=$web_dir checkout -f
具体总结 su - git cd /opt/git/repositories/xx/xx.git rm -rf hooks cp -r /opt/git/gitlab-shell/hooks ./ cd hooks rm -rf pre-receive update ln -s /opt/git/gitlab-shell/hooks/pre-receive pre-receive ln -s /opt/git/gitlab-shell/hooks/update update vim post-receive #!/bin/bash web_dir=/opt/xx/xx/ git --work-tree=$web_dir checkout -f git checkout不够好,更进一步看下面的链接
gitlab hook 加了expect
标签:hooks
原文地址:http://szgb2014.blog.51cto.com/340201/1775314