.gitignore How to ignore only the index.html in the project root directory but not the index.html in subdirectories
.gitignore
index.html
Do you write it like this?
欢迎选择我的课程,让我们一起见证您的进步~~
/index.html will do. This involves the matching problem of gitignore. If it does not start with / (slash), git will match all index.html in the directory. After adding /, it will match according to the path
@老老哥 is right, the questioner should do exactly what he said!
./index.html
If your gitignore is also on the root (usually it is). You just need to add a line index.html in gitignore.
/index.html will do.
This involves the matching problem of gitignore. If it does not start with / (slash), git will match all index.html in the directory. After adding /, it will match according to the path
@老老哥 is right, the questioner should do exactly what he said!
./index.html
If your gitignore is also on the root (usually it is).
You just need to add a line index.html in gitignore.