MS Word did create these files automatically while the files were opened. I accidentially committed these files. After closing MS Word the files have been deleted automatically. Now Git still shows the files and I cannot remove, add or checkout them. How to remove these files from the repository?
Changes not staged for commit: (use "git add/rm <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) deleted: NonProject/GameObjectSetupInstructions/RaceScene/~$VFX.docx deleted: NonProject/GameObjectSetupInstructions/RaceScene/~$ceSceneLighting.docx modified: NonProject/GameObjectSetupInstructions/RaceScene/~$ceSceneSetup.docx $ git checkout NonProject/GameObjectSetupInstructions/RaceScene/~$VFX.docx error: pathspec 'NonProject/GameObjectSetupInstructions/RaceScene/~.docx' did not match any file(s) known to git $ git rm --cached NonProject/GameObjectSetupInstructions/RaceScene/~$VFX.docx fatal: pathspec 'NonProject/GameObjectSetupInstructions/RaceScene/~.docx' did not match any files $ git rm NonProject/GameObjectSetupInstructions/RaceScene/~$VFX.docx fatal: pathspec 'NonProject/GameObjectSetupInstructions/RaceScene/~.docx' did not match any files
git add 'NonProject/GameObjectSetupInstructions/RaceScene/~$VFX.docx'?~was likely being interpreted as your home directory. Trycd ~orcd ~/Documents.