Я тоже получил это сообщение об ошибке.
, и я думаю, что здесь полезно дать ответ, что ответ @ Rafał Rawicki является хорошим решением в некоторых случаях, но не для всех обстоятельств.пример, который я встретил:
1.run "git log" we can get the HEAD commit change-id
2.we also can get a 'HEAD' commit change-id on Gerrit website.
3.they are different ,which makes us can not push successfully and get the "missing change-id error"
решение:
0.'git add .'
1.save your HEAD commit change-id got from 'git log',it will be used later.
2.copy the HEAD commit change-id from Gerrit website.
3.'git reset HEAD'
4.'git commit --amend' and copy the change-id from **Gerrit website** to the commit message in the last paragraph(replace previous change-id)
5.'git push *' you can push successfully now but can not find the HEAD commit from **git log** on Gerrit website too
6.'git reset HEAD'
7.'git commit --amend' and copy the change-id from **git log**(we saved in step 1) to the commit message in the last paragraph(replace previous change-id)
8.'git push *' you can find the HEAD commit from **git log** on Gerrit website,they have the same change-id
9.done