Original source can be found on StackOverflow.
A being the first commit:
git rebase -i A
It is possible to start like that if you continue with edit rather than squash:
edit e97a17b B
pick asd314f C
then run
git reset --soft HEAD^
git commit --amend
git rebase --continue