git push 代码时 失败,失败现象是提示:remote: ERROR: commit fcf5889: missing Change-Id in message footer

解决方法一:根据出错提示中的操作来进行:(Hint:to automatically insert a Change-Id,install the hook:)
执行命令1:
gitdir=$(git rev-parse --git-dir); scp -p -P 29418 xxxxx@xxx-Server-2:hooks/commit-msg ${gitdir}/hooks/
执行命令2:
git commit --amend --no-edit
然后重新push 就能成功;
解决方法二:ssh 拉代码时使用 Clone with commit-msg hook 的ssh路径;
本文介绍了当使用gitpush时遇到的错误,由于commit消息中缺少Change-Id。提供了两种解决方案:一是通过安装commit-msg钩子自动添加Change-Id;二是使用SSH时指定包含commit-msghook的路径,以确保提交信息完整并成功推送。
11万+





