Create commit B in the new branch.
Entering this branch, use git review , and it will only push the contents of this branch to Gerrit.
Thus, Gerrit will not assume that your commit B requires your commit A, and if you want, you can merge your commit B into a working branch before commit A
If your story is this:
...-old(merged)-A(waiting for review)
What do you want to do:
...-old(merged)-A(waiting for review) <-master branch \B(new commit) <-new branch
Then, if you are on branch B and using git review , it will not push anything except commit B
If you are in this situation:
...-old(merged)-A(waiting for review)-B
what do you want to do to achieve your desired configuration:
git log (Note the SHA1 of your B commit) git reset HEAD^^^ (you go back in detched state three commits before, before the two you don't want to send) git checkout -b Breview (you create a new branch there) git cherry-pick +the SHA1 you noted (you copy your B commit on your new branch) git checkout master (you return on your branch with the two commit) git reset HEAD^--hard (you delete the B commit from this branch where you don't need it)
Now you have reached your desired configuration and pressed your B-commit, you just need to do:
git checkout Breview git review
and it will only send your B commit
Rudy bunel
source share