'Git removing references from invalidly, non-existing, c:\tmp\file.har named file in bitbucket
This question is in regards how to in Git removing references from invalidly, non-existing, c:\tmp\file.har named file in bitbucket
I usually work on linux (where the error do not surface, probably because it is not a reserved OS path/filename, and the checkout simply ignores the file) , but now one of our git users on windows reports when checkout they see;
Untracked files Prevent checkout, please move or commit them before checkout
"Couldn't checkout origin/master invalid path c:\tmp\file.har"
I found in bitbucket somebody has managed to check in such named file, do not ask me how they managed, but it makes GIT checkout , even with --force failing due to the invalidly named file. Normally c:\tmp is not a place we use as a root for checked out projects.
I also tried to make c:\tmp git root, and manually create such named file in tmp, but even so the git commands show above error or similar types of errors.
And if I try do a git rm file.har it returns fatal: pathspec file.har do not match any pages
also tried things like open an IDE and then try do a rollback on all files that GIT shows as deletet because it didn't succed the checkout hence "thinks" they are deleted from disk. Even that fails with a msg that the file is not tracked or has an invalid file name. sometimes the file name is shown in GIT error msg within double quotes sometimes single quotes.
Have tried with git version 2.28 and 2.35.0.windows.1
thank you for any hints how to rectify
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
