The reason I’m asking is that I just tried working on a file with weird characters and got the same error message. The editor has some problems if you have files with spaces or non ascii characters so we recommend against it.
The editor has very simple Git control functions and you can use Git command line or an external tool if you want. The editor does a local commit before it tries to pull changes into the current branch. You should be able to find all your lost commits in Git, but it requires some digging.