I\'d like to rebase to a specific commit, not to a HEAD of the other branch:
A --- B --- C master \\ \\-- D topic
Use the "onto" option:
git rebase --onto master^ D^ D