gerrit error: missing Change-Id in commit message footer

Recently, the company warehouse changed from Gitlib to Gerrit, and you need to get the boss to review the submitted code before you can push it. This error occurred the first time it was used.
record, also convenient to check in the future:
Step1: copy this sentence to the terminal (on your own terminal)
gitdir=$(git rev-parse –git-dir); SCP – p – p 29418 102001111 @192.168.132.200: hooks/commit – MSG ${gitdir}/hooks/
step2: paste directly to the terminal (without modifications exit row)
the git commit – amend
step3: paste to the terminal (dev branch can be amended as required)
git push origin HEAD: refs/for/dev
Reference:
https://blog.csdn.net/weixin_33910385/article/details/92457771

Read More: