git提交代码缺少ChangeId

$ git push origin master:refs/for/master
Counting objects: 12, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (7/7), done.
Writing objects: 100% (12/12), 988 bytes | 0 bytes/s, done.
Total 12 (delta 4), reused 0 (delta 0)
remote: Resolving deltas: 100% (4/4)
remote: Processing changes: refs: 1, done
remote: ERROR: [e3d0821] missing Change-Id in commit message footer
remote:
remote: Hint: To automatically insert Change-Id, install the hook:
remote:   gitdir=$(git rev-parse --git-dir); scp -p -P 29418 minghua.zhang@gerrit01.fihbdc.com:hooks/commit-msg ${gitdir}/hooks/
remote: And then amend the commit:
remote:   git commit --amend
remote:
To ssh://minghua.zhang@gerrit01.fihbdc.com:29418/APP/NoteWidget
 ! [remote rejected] master -> refs/for/master ([e3d0821] missing Change-Id in commit message footer)

error: failed to push some refs to 'ssh://minghua.zhang@gerrit01.fihbdc.com:29418/APP/NoteWidget'

问题原因:

git clone 代码命令出错了,导致无hook 

解决方法:

执行

scp -p -P 29418 minghua.zhang@gerrit01.fihbdc.com:hooks/commit-msg .git/hooks/

git commit --amend
git push ...

阅读更多
个人分类: Android
上一篇剑指offer(java版)面试题12:矩阵中的路径
下一篇剑指offer(java版)面试题54:二叉搜索树的第k个结点
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭