I think it is not possible with git-review, but you can do this without git-review using raw push command.
For example usually without git-review you will use command like this:
git push origin HEAD:refs/for/master
And if you want to push only one (it will be one only in case if all commits before A
are already in master
) specific commit, for example commit A
, you can use its hash instead of HEAD
:
git push origin A:refs/for/master
But usage of hash is not very nice because you should know it and you can do this in more easier way using construction like this HEAD~2
, this will tell git use third commit starting from HEAD
and in your case it will be A
:
git push origin HEAD~2:refs/for/master
But construction like git push origin HEAD~2:refs/for/master
is too long and instead of it you can create several git aliases like this (example aliases bellow will always use master
as destination branch, so if in your workflow you are using several destination branches like master
with development
then you will need to create aliases for each branch like review-master-2
and review-development-2
):
git config --global alias.review-1 'push origin HEAD~1:refs/for/master'
git config --global alias.review-2 'push origin HEAD~2:refs/for/master'
git config --global alias.review-3 'push origin HEAD~3:refs/for/master'
git config --global alias.review-4 'push origin HEAD~4:refs/for/master'
git config --global alias.review-5 'push origin HEAD~5:refs/for/master'
And with aliases you can push commit A
using short command like this:
git review-2