snoob dogg
snoob dogg

Reputation: 2885

Git consider C:/ as Untracked files after removing .git/index.lock

That's one of the weirdest prob I've encoutered with Git. Before I deleted index.lock file, Git tells me that this file was used by one another process and proposed me to delete this file to continue. Since I'm using Cygwin with ConEmu, it sometimes happens that my setup begins to be a bit unstable, so I removed it. But after that, If I do a git status I see something like that :

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        ...*some file to commit*...
        C:/

Of course If I try a git add . it will never end... I was able to add the legit modified files into a commit but C:/ still there ... really weird, any idea of what to do ?

Upvotes: 2

Views: 82

Answers (2)

snoob dogg
snoob dogg

Reputation: 2885

Fixed, no idea how it appeared but I had a symbolic link to C:/ in my folder. Just had to delete it

Upvotes: 0

VonC
VonC

Reputation: 1329892

First, make sure to use Git For Windows, not git as installed as a Cygwin package.
The most recent versions of Git for Windows do manage index.lock better (example with Git 2.25)

Second, make sure there is no .git subfolder right under C:\, or Git would consider the all drive as one giant Git repository.

Upvotes: 1

Related Questions