git 报错:ERROR: missing Change-Id in commit message footer

koson@koson-Liao:~/work/SourceFile/iwds_kernel/slpt$ git push origin 
Counting objects: 108, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (15/15), done.
Writing objects: 100% (15/15), 2.62 KiB | 0 bytes/s, done.
Total 15 (delta 12), reused 0 (delta 0)
remote: Resolving deltas: 100% (12/12)
remote: Processing changes: refs: 1, done    
remote: ERROR: missing Change-Id in commit message footer
remote: Suggestion for commit message:
remote: slpt: add the JDI panel
remote: 
remote: Change-Id: If81938d417c4ddfdb0781d4576badf5f2f9bcd8b
remote: 
remote: Hint: To automatically insert Change-Id, install the hook:
remote:   gitdir=$(git rev-parse --git-dir); scp -p -P 29418 [email protected]:hooks/commit-msg ${gitdir}/hooks/
remote: 
remote: 
To ssh://[email protected]:29418/sw1/slpt
 ! [remote rejected] HEAD -> refs/for/refs/heads/master (missing Change-Id in commit message footer)
error: failed to push some refs to 'ssh://[email protected]:29418/sw1/slpt'

解决办法:

1.按照提示生成.git/hooks/目录下的commit-msg文件,然后重新git commit --amed。

2.如果生成不成功,就去别的.git/hooks/目录下拷贝一个。

你可能感兴趣的:(git)