in .gitignore! Why does the configuration item not work?
大家讲道理
大家讲道理 2017-05-02 09:43:04
0
2
760


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. . .

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(2)
给我你的怀抱

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. !

An optional prefix "!" which negates the pattern; any matching file excluded by a previous pattern will become included again. It is not possible to re-include a file if a parent directory of that file is excluded.

阿神

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.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template