$ git rebase -i HEAD~<num>
$ git push --force origin <branchname>
$ git reset --soft HEAD^
$ git reset --hard HEAD^
From [A to B]
git cherry-pick A^..B
From (A to B]
git cherry-pick A..B
$ git rebase -i HEAD~<num>
$ git push --force origin <branchname>
$ git reset --soft HEAD^
$ git reset --hard HEAD^
From [A to B]
git cherry-pick A^..B
From (A to B]
git cherry-pick A..B