I want the /public/examples/images/ directory not to be ignored, but this configuration does not work!
According to logic, it should be reasonable, because the /public/examples/ directory has been ignored before, then the directories below it must be ignored.
But after looking for an introduction to the configuration items of .gitignore, I found that my configuration method was not wrong! This is very sad and I don't understand why it doesn't work. . .
This is specifically explained in the gitignore manual. If a parent directory has been set to not be included, then its subdirectories cannot be reused and included.
!
It may be because you have added this directory to git, and then writing gitignore does not work. Use git rm to delete the unwanted paths in git, and then take a look and it should be fine
It seems that gitignore cannot block files or paths that have been added to git.