折腾:
【未解决】把自己Mac中gitbook的template和books合并成一套
期间,此处:
希望对于:
gitbook_template/books
全部排除掉,但只包含子文件夹:
gitbook_template/books/gitbook_demo
gitignore exclude but include
# exclude all in books books/**/* # include only gitbook_demo !books/gitbook_demo
然后VSCode中立刻生效了:
效果很好。
且再去看status,也就没了那么多books了:
【总结】
此处,想要:
- 排除掉books下面所有的子文件夹
- 但是只保留books/gitbook_demo
具体写法是:
# exclude all in books books/**/* # include only single subfolder: gitbook_demo !books/gitbook_demo
即可。