Why does Git report a random, nonexistent directory or file as a file without a trace?

After making a few changes to the repo, when I run git status , I get the following:

Tracked files: (use "git add ..." to include in what will be executed)

  "etting\357\200\233\357\200\233\357\200\233\357\200\233\357\200\272" 

This file does not exist. I'm not sure where the random numbers come from. Oddly enough, it is also surrounded by quotation marks. The status also correctly shows my modified files.

What could be the reason for this? I had this happen several times earlier and had to reset to return to the correct state. Is it possible that the repo is damaged in some way?

+5
source share
3 answers

If you added an unused file like ": q", it reports "\ 357 \ 200 \ 272q".

+2
source

This may not be your exact scenario, but I found that having a local repo directory in 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 deleted the repo from the odrive directory and deleted all files with the file type ".cloud" (which means that the file is in the cloud, and not on the local computer). I really don't know what exactly caused this, but it definitely solved the problem for me.

+2
source

You are probably making a file that you accidentally called: "etting ::" or something similar. I had "c / 357 \ 200 \ 272" because I accidentally created a file called "c:" in this directory.

Just indicate what you have in this directory and you are likely to see a file that does not belong. Remove and you must be good.

+1
source

Source: https://habr.com/ru/post/1258220/


All Articles