The best way to do it is as mentioned in @ElpieKay's comment, and at the end of your question: merge
warning-fixes and then reset
staging to previous commit.
To do it from the command line, do:
git checkout warning-fixes git merge staging git checkout staging git reset --hard HEAD^
warning-fixesto check it out.
Merge staging into current branch.
stagingto check it out.
Reset current branch to this commit.
The reason you don't want to use
rebase is that it doesn't just move the commits, but it also moves the branch pointer. In this case, attempting to rebase
warning-fixes would have no effect, since the commit at the tip of
staging already has the same parent as the tip of
The only real alternative is to use
cherry-pick, but since there is only one commit, it will have exactly the same effect as a merge.