• 报错
fangjian@u123:/home3/fangjian/LA.UM.9.12$ git push origin HEAD:refs/for/SRM900_custom
Counting objects: 29, done.
Delta compression using up to 64 threads.
Compressing objects: 100% (27/27), done.
Writing objects: 100% (29/29), 2.76 KiB | 0 bytes/s, done.
Total 29 (delta 19), reused 0 (delta 0)
remote: Resolving deltas: 100% (19/19)
remote: Counting objects: 880380, done
remote: Processing changes: refs: 1, done
remote: ERROR: commit 29189f3: missing Change-Id in message footer
remote:
remote: Hint: to automatically insert a Change-Id, install the hook:
remote:   gitdir=$(git rev-parse --git-dir); scp -p -P 29418 fangjian@192.168.0.240:hooks/commit-msg ${gitdir}/hooks/
remote: and then amend the commit:
remote:   git commit --amend --no-edit
remote: Finally, push your changes again
remote:
To ssh://fangjian@192.168.0.240:29418/LA.UM.9.12
 ! [remote rejected] HEAD -> refs/for/SRM900_custom (commit 29189f3: missing Change-Id in message footer)
error: failed to push some refs to 'ssh://fangjian@192.168.0.240:29418/LA.UM.9.12'

按照提示操作仍报错

gitdir=$(git rev-parse --git-dir); scp -p -P 29418 fangjian@192.168.0.240:hooks/commit-msg ${gitdir}/hooks/
git commit --amend --no-edit
git push origin HEAD:refs/for/SRM900_custom
  • 解决
git stash && git pull --rebase && git stash pop
git push origin HEAD:refs/for/SRM900_custom
Logo

开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!

更多推荐