scaborski
scaborski

Reputation: 145

unable to git rid of untracked file in git - file says No Such File or Directory

Hi I'm trying to get rid of an Untracked File in git on Bash in Ubuntu on windows 10. I'm able to push/pull no issues.

when i go

git status

I get the following:

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

    /Home/SignInButton.js

nothing added to commit but untracked files present (use "git add" to track)

if i got into the directory, i get

-rwxrwxrwx 1 root root  655 Jun  9 22:43 LogInButton.js
-????????? ? ?    ?       ?            ? SignInButton.js

I have tried the following commands

git rm                No change
git checkout -- .     No change
git reset --hard      Reset but still the same warning
git clean -f -d       I get the "No such file or directory"
git stash             No change

What else should I try?

Upvotes: 1

Views: 489

Answers (1)

chuckx
chuckx

Reputation: 6947

The numerous ? in the file listing indicates a situation where the Linux subsystem has tried to clear out the resource, but something outside of the subsystem is keeping it around.

Once all open filehandles are closed, both within and outside of the Linux subsystem, the delete operation should complete.

Upvotes: 1

Related Questions