MrThankUvryMuch
MrThankUvryMuch

Reputation: 21

.gitignore Doesn't Track my Files Even After Using "git rm -r --cached ." and "git add ."?

I've run "git rm -r --cached ." and "git add ." several times now trying to fix this, among other things. Nothing's worked yet.

I have this directory, I want the untracked files to be ignored. This is my .gitignore

Even when removing all cached files and readding everything, the untracked files still get tracked by git. My .gitignore is in the root of my repo, like it should be, and I believe I named all files correctly. Running "git ls-files . --ignored --exclude-standard --others" returns nothing, both when the files are tracked and untracked.

What's my issue here? Thank you.

Upvotes: 1

Views: 56

Answers (1)

MrThankUvryMuch
MrThankUvryMuch

Reputation: 21

torek's comment above worked. My .gitignore was stored as UTF-16-LE. Creating the .gitignore within VSCode caused the issue, and deleting that and creating it right on github fixed it.

Upvotes: 1

Related Questions