smarber
smarber

Reputation: 5084

git ignores file although it's not into .gitignore

So the problem is that I'm given a project that I have to work on. I have config.yml file that I'm editing, however it doesn't show up in the output of ``git status. I checked.gitignoreandconfig.yml` is not in it.

But when I run this to see ignored files by git I see my file config.yml

git ls-files --others -i --exclude-standard

How come config.yml is ignored although it's not mentioned in .gitignore? And how do I exclude it from ignored files list?

UPDATE1

config.yml is mentioned in another .gitignore that's why :/

Upvotes: 1

Views: 64

Answers (1)

Cody Haines
Cody Haines

Reputation: 1235

If you can't figure out what's causing it to be ignored, a brute force solution to making it 'unignored' is to simply run

git add -f config.yaml

Git will then track that file.

Upvotes: 2

Related Questions