Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git push remote rejected {change ### closed}

Tags:

git

gerrit

i am having problems pushing my changes from my local master to remote master because of this error:

remote: Processing changes: refs: 1, done
To ssh://[email protected]:29418/xxxxxx
 ! [remote rejected] HEAD -> refs/for/master (change 14823 closed)
error: failed to push some refs to 'ssh://[email protected]:29418/xxxxxx'

any idea how i can fix this issue?

git status says my branch is ahead of origin/master by 5 commits.

like image 421
Jonathan Avatar asked Aug 15 '12 15:08

Jonathan


3 Answers

I got the same message. And it was because I have managed to get the same Change-Id for two commits. Maybe due to some cherry-picking or similar between my local branches. Solved by removing the Change-Id from the commit message, a new Id then was added by the commit hook.

like image 115
Johan Avatar answered Oct 21 '22 17:10

Johan


Your Commit Change ID is expired ie, Review 14823 is closed. you can't push to same.

Do this to fix issue:

  1. git commit --amend
  2. delete change id
  3. save and quit
  4. new change id will be added to the commit. it can be verified by git log.
  5. push again
like image 38
suprith Avatar answered Oct 21 '22 17:10

suprith


I found the following page which details exactly why you're unable to push your changes to the origin due to the change XXXXX closed error: https://git.eclipse.org/r/Documentation/error-change-closed.html

Cheers!

like image 7
Sterling Bourne Avatar answered Oct 21 '22 16:10

Sterling Bourne