gitlib 使用p3c教程
不建议老项目使用,否则后果自负1、使用admin找到对应项目的相对路径2、打开gitlab服务器找到目录/var/opt/gitlab/git-data/repositories3、找到项目的
不建议老项目使用,否则后果自负
1、使用admin找到对应项目的相对路径
2、打开gitlab服务器找到目录/var/opt/gitlab/git-data/repositories
3、找到项目的位置
cp -R /opt/git-hooks/custom_hooks custom_hooks
chown -R git:root custom_hooks
chmod 777 custom_hooks/pre-receive.d/pre-receive
不需要重启gitlab,即时生效
仓库地址:http://git.yunmell.com:9898/alphah/code-p3c
rulesets包中为规则,也可自行添加,需要调整custom_hooks/pre-receive.d/pre-receive的命令,使用新加的规则,规则需要放到/opt/git-hooks/rulesets
之后提交代码如果不符合规则则提交不成功
相关文章
发表评论
评论列表
- 这篇文章还没有收到评论,赶紧来抢沙发吧~