The solution to this problem is to always use current HEAD's last commit ID, not the one from commit made to your branch. Using branch's last commit ID is wrong. Why -- this is beyond my imagination.
So, correct path is:
- Create branch using UI and giving HEAD's revision.
- Push changes (that branch) to Gerrit, don't forget about correct refs.
- Visit page, which URL Gerrit gave you as a result of your push and review your change or wait for someone else to review it.
As alternative, you can simply click Create Branch
with Initial Revision
field empty, so Gerrit will auto-fill it. Then push Create Branch
button again.
EDIT: This answer only explains, what to do, to get change accepted by Gerrit. It doesn't explains, why in previous approach (explained in question), Gerrit is claiming, that there are no changes and does not accept the code, while it actually have not code at all (for that particular branch). For me, this is a huge bug, that leads to a code losses. (incorrect as per comment below)