I accidentally committed to a branch that I didn't realize someone else was working on and my changes are completely incompatible with what they have done. By total coincidence, our branch names just happened to be the same.
I haven't pushed to their branch, but I did commit locally.
I tried doing git rebase --onto some-branch-alt some-branch
but I get the error:
fatal: Does not point to a valid commit 'some-branch-alt'
How do I move my commits on some-branch
over to a new separate branch some-branch-alt
which itself is branched from somewhere completely different from the other author's git branch?