git status:
Untracked files:
(use "git add <file>..." to include in what will be committed)
.settings/
I've tried the following variations on my .gitignore file and nothing seems to work:
.settings/
*settings*
*.settings/
.settings/*
I've never had this much trouble with .gitignore
, it usually just works. I must be doing something real dumb.
NOTE: My .gitignore
file has more in it than just that one line (all the other lines works correctly).
I thought I had the same problem. Turns out, the reason I kept seeing .settings/ in git status was because someone else already committed .settings/ to the repo. So, .settings/ kept showing up under the Changes not staged for commit files list because my IDE touched/changed this directory.
You want .settings/ to stay invisible to git so remove it from tracking. Then, when you make a change that touches this directory, you won't see it under the Untracked files list because you added it to the .gitignore file. Whoever committed .settings/ in the 1st place also won't see it as eligible for commit either because they updated their .gitignore file with your update to ignore .settings/ folder.
/**/.settings/
worked to ignore the .settings folders below the root.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With