Is there a way to rebase a single commit from a branch onto another branch?
I have this branch structure:
-- -- -- -- -- (Master)
\\
git rebase --onto master branch~1 branch
This says "rebase the range of commits between last-before-branch and branch (that is, XX commit) on the tip of master branch"
After this operation branch tip is moved on commit XX, so you want to set it back with
git checkout branch
git reset --hard branch@{1}^
Which says "reset the branch tip to the commit before its previous state"
So a cherry pick is a simpler solution...