git and gerrit issue while review
I am working with git.
when i commit the code its fine but during the review its throwing error
$ git review
gives me following error message:
Is this really what you meant to do? Type 'yes' to confirm: yes remote: Resolving deltas: 100% (28/28) remote: Processing changes: refs: 1, done To ssh://email@example.com:29418/bdu-celery ! [remote rejected] HEAD -> refs/publish/master/abc_org_uk_geography (change 257 closed) error: failed to push some refs to 'ssh://firstname.lastname@example.org:29418/bdu-celery'
Can someone let us now how to fix this
git review looks like it's a name alias of git command. I think it used wrong destination refs spec.
You can use push your code to gerrit server with right refs spec, such as
git push gerrit HEAD:refs/for/master
gerrit is name of gerrit git repo
assuming you want to push working branch to master
The issue here is quite simple, you're trying to push to a closed review -- "(change 257 closed)".
Change 257 is identified by the Change-Id in your commit message, e.g.:
commit 67b36a52914afc3098d9da6750bb8f3d4a9561ac Author: Paul Bourke <email@example.com> Date: Wed Mar 12 16:45:53 2014 +0000 Hello World Change-Id: I5e6481e8c069591272d1aee5ab1197e94354ba8c
If you want to submit this as a new review, remove the Change-Id and git review will generate a new one:
git commit --amend # delete the Change-Id line and save git commit --amend