执行命令
curl -Lo .git/hooks/commit-msg http://server:port/tools/hooks/commit-msg
- server: 代码仓库的服务器地址
- port: 服务器端口号
注意将其替换
如果上述命令执行失败,直接下载commit-msg文件,将其拷贝到项目目录下 .git/hooks/commit-msg
执行命令自动会添加 ChangeId, git commit --amend --no-edit
执行命令
curl -Lo .git/hooks/commit-msg http://server:port/tools/hooks/commit-msg
注意将其替换
如果上述命令执行失败,直接下载commit-msg文件,将其拷贝到项目目录下 .git/hooks/commit-msg
执行命令自动会添加 ChangeId, git commit --amend --no-edit