.gitignore 如何仅忽略根目录下的index.html
天蓬老师
天蓬老师 2017-05-02 09:25:42
0
4
655

.gitignore 如何仅忽略项目根目录下的 index.html 但不忽略子目录的 index.html

index.html

这样子写吗?

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(4)
phpcn_u1582

/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

过去多啦不再A梦

@老老哥 is right, the questioner should do exactly what he said!

Ty80

./index.html

洪涛

If your gitignore is also on the root (usually it is).
You just need to add a line index.html in gitignore.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!