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)
Git reset files with typechange status Expanding local repo .git contents ssh_exchange_identification: Connection closed by remote host under Git bash Git ignore local file changes When to use “chore” as type of commit message? bulk rename of files to lowercase in git
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.