I got stuck in this. I created the head-name file, and then I ran into another error saying it couldn’t find the onto file, so I created that file. Then I got another error saying could not read ‘.git/rebase-apply/onto’: No such file or directory.
So I looked at the git documentation for rebasing and found another command:
git rebase --quit
This set me back on my branch with no changes, and I could start my rebase over again, good as new.