(1) git push 异常:

remote: Hint: To automatically insert Change-Id, install the hook:
remote:   gitdir=$(git rev-parse --git-dir); scp -p -P 29418 xxxx@xxxx:hooks/commit-msg ${gitdir}/hooks/
remote: And then amend the commit:
remote:   git commit --amend

以上错误,自动插入Change-Id失败,需要安装hook,才能自动加入Change-Id。

(2)解决方法:

需要在对应path,执行scp -p -P 29418 xxxx@xxxx:hooks/commit-msg   ${gitdir}/hooks/ ,一般直接在对应 .git 所在目录执行即可。${gitdir}/hooks/,例如 .git/hooks/

hook安装成功后,需要执行 git commit --amend,更新当前提交的commit,否则就会形成一次新的提交。

(3)再次递交:

git push origin HEAD:refs/for/分支

 

以上,为Change-Id自动识别添加过程。也可通过手动方案添加,方案待续。

 

补充手动方案:

(1)拷贝Change-Id;

(2)执行 ,git commit --amend ,将 Change-Id 写入commit信息内,保存退出;

(3)递交即可;

 

 

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐