git rebase на основе коммита

git branch temp master^
git checkout topic
git rebase temp
git branch -d temp
Hilarious Horse