Why does Git report a random, non-existent directory or file as an untracked file?
After making a few changes within a repo, when I run a
git status I get the following:
(use “git add …” to include in what will be committed)
- Does git merge --no-commit prevent any changes?
- error: RPC failed; result=6, HTTP code = 0
- Including submodules in git checkout to GIT_WORK_TREE in hook
- Add and commit changes to all git's branches with one command
- How to include git changelog in Jenkins emails?
- GIT: Changed File Names With Certain Extension
This file does not exist. I’m not sure where the seemingly random numbers come from. Oddly, it’s also surrounded in quotes. The status does also correctly show my modified files.
What could cause this? I’ve had it happen a few times before and had to perform a reset to return to a correct state. Is it possible the repo is corrupted in some way?
2 Solutions collect form web for “Why does Git report a random, non-existent directory or file as an untracked file?”
If you add an untracked file like “:q” it reports as “\357\200\272q” .
This might not be your exact same scenario, but I found that having the repo’s local directory within my odrive created this:
$ git status On branch master Untracked files: (use "git add <file>..." to include in what will be committed) "\357\200\272"
I removed the repo from the odrive directory and then removed any files that had a file type of “.cloud” (which means the file is in the cloud and not on the local machine). I really don’t know what exactly caused it, but this definitely fixed the problem for me.