The best way I've found is:
git checkout -b tmp master^^
# Now tmp is on top of C
git cherry-pick master
# Now tmp is on top of C1', a copy of C1
git rebase -p tmp master
# Now master is on top of a merge commit from C1' and A
git branch -d tmp
I don't know why git rebase
cannot do this all at once without git cherry-pick
, but at least I know this works.