I just started using git in Windows. I am using the latest PortableGit version 2.30.1 and I believe I have set them up correctly.
I am just trying to practice with git's more advanced features such as branching, merging, tagging etc. So I created a simple mock project for it.
I just started the project. The project has only 2 files currently: f1.py and .gitignore. It currently only has 2 commits.
The problem is that in my last (2nd) commit, I have incorrectly use single quote for git commit message and it complains of pathspec error:
C:\ex\gitpractice>git commit -m 'Modified A1 -> A2'
error: pathspec 'A1' did not match any file<s> know to git
error: pathspec '-' did not match any file<s> know to git
Then I tried:
C:\ex\gitpractice>git commit -m \'Modified A1 \-> A2'
fatal: \A1: '\A1' is outside repository at 'C:/ex/gitpractice'
Which resulted in something 'fatal', I know, I was so stupid... Then I commited using the correct double-quote:
C:\ex\gitpractice>git commit -m "Modified A1 -> A2"
It was successfull. But anyway, I was left with multiple files, that I did not intentionally create. Anyway here is the screenshot of what has happened:
As you could see, I tried removing the other files using git rm
and it did not even work.
I also used Vim 8.2 to edit the files there (and I am just a beginner vim user). And I just knew today that I should not be using single quotes in git-cmd.exe in windows from https://github.com/cmderdev/cmder/issues/2052. But I was still left with the extra files created.
What happened during the 'fatal' commit? What are those extra files? Is it safe to remove them? Should / How can I remove them ? (I usually used git and edited in nano in Ubuntu machines before)