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:

Untracked files:
(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
  •    "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 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?

  • What is the git equivalent for a specific version checkout, like “svn checkout -r 123 <svn_rep_url>”
  • show git branches with date of last commit
  • create a sub-repository and insert it in the main project
  • why some git commits are older than their parent?
  • git-clone fatal, permission denied
  • Bash errors PS1 and git completion
  • 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.

    Git Baby is a git and github fan, let's start git clone.