Git push remote rejected {change ### closed}

Jonathan picture Jonathan · Aug 15, 2012 · Viewed 76.9k times · Source

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.

Answer

Johan picture Johan · Apr 2, 2014

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.