Where I work, I often have to create commits on top of other unmerged commits as it takes a while for my code to be reviewed and merged. This usually works well, but I sometimes run into a problem when I do something like this:
1. Check out a gerrit commit that's based on three other commits using git fetch && git checkout, let's say the unmerged commits from latest to oldest are 4, 3, 2, 1.
2. Create a new branch from the checked-out commit.
3. Set the master branch as remote and do a pull rebase.
4. Resolve conflicts in 2 and 4 and successfully finish the rebase.
5. Try to do a git push origin HEAD:refs/for/master which gives me a remote rejected, no changes made error because it's not detecting any changes in commit 1.
Any way I can get around this?
Thanks much, Nir