I have two files .cat and .inf which are not mentioned in the .gitignore file. But still, they are greyed out in VS code which shows that they are not getting committed/uploaded to the git repo.
my-file.cat
my-file.inf
I am using the visual studio default .gitignore file.
ref: https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
how to explicitly mention to include some files. or are there any global ignore settings in which these files are mentioned to be ignored by default?
2
Answers
You can explicitly tell
.gitignore
file to include some files by prefixing a bang likeYou should prefer to actually figure out what’s making them be ignored though. (Maybe they’re in an ignored folder?)
Use check-ignore to see which rule is ignoring the files:
It will tell you which rule in which file is causing the file to be ignored. Then adjust that file accordingly.