The use of exclamation marks in git .gitignore
给我你的怀抱
给我你的怀抱 2017-05-02 09:27:00
0
3
723

I found the document, but I don’t quite understand it. Could you please explain it

给我你的怀抱
给我你的怀抱

reply all(3)
小葫芦

If you do not use "!", the files listed in gitignore or the files that meet the wildcard character will be ignored;
If you do not want the file that was previously ignored by the wildcard character to be ignored, you can use "!" It is excluded;
If the directory where a file is located is defined in gitignore, then setting "!" to this file will not take effect, that is, the file will still be ignored;
If the file name itself starts with "!", When using "!" you need to escape it with "".

In other words, "!test.tmp" means performing "!" operations on "test.tmp", and "!test.tmp" is the correct way to perform "!" operations on the file "!test.tmp" .

仅有的幸福

! It means that if your previous pattern ignores the file or folder, if you use the same pattern later but add one in front! , the ignored content will be added again. But if the pattern above is a folder, and! What follows is the contents of the folder, so you cannot add files to it. And if you want to add more! Files starting with must be used to escape

我想大声告诉你

Uh-huh. . Take ‘not’. .

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