After resetting and trying again I found that actually path/to/file.yml~abcdefghi (BRANCHNAME branch-commit-msg)
was the name of a file, including the spaces and parentheses. I thought it was some kind of annotation added by git to help identify the file but it's not. In the first attempt I also somehow managed to delete the file without noticing its odd name, and therefore I didn't see it in the ls -l
output.
So the tldr is don't get confused by strange file names...