I am facing this issue in Gerrit, Git.
- I made changes(branch-ONE) and pushed to gerrit(say change Id-240) from eclipse. But not merged.
- Next I created one more branch (branch-TWO) and commit the changes without amending to previous commit. So got new gerrit change Id (say, change id-241).
- Next, I abandoned the changeId 240.
- Now, when i try to push my changes from branch-TWO, it says remote rejected as it is trying to push to changeid 240 instead of 241. Why?
What I tried --
After reading through internet of possible solutions, I did HARD reset and my changes of changeId-241 got vanished. I though got it back from reflog. But moment, when I try to checkOut branch-ONE (to do HARD Reset), my changes of changeId-241 is vanished.
I am trying to follow this - Git merge pending due to an abandoned commit