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路径;