If you want to ignore all file tracking in the upload folder, but not ignore index.html, single rule
Set as follows in the .gitignore file
uploads/*
uploads/!index.html
But it doesn’t work, index.html is also ignored and not tracked. Is there something wrong with this syntax?
Git version 2.6.3
Create a new .gitignore under the upload folder with the following content:
Floor 2 is correct, if you don’t want to
upload
文件夹下新增.gitignore
, you can put your codeSwap the positions, because your rule is
My personal test was to write it like this
uploads/* uploads/!index.html
It didn’t work. Later I researched it and found that it can be written like this. See my blog post http://blog.csdn.net/CalShell...