Git 忽略任何目录中的文件
示例
要忽略任何目录中的文件foo.txt,您只需输入文件名:
foo.txt # matches all files 'foo.txt' in any directory
如果只想在树的一部分中忽略文件,则可以使用**pattern指定特定目录的子目录:
bar/**/foo.txt # matches all files 'foo.txt' in 'bar' and all subdirectories
或者,您可以.gitignore在bar/目录中创建文件。与上一个示例等效,将bar/.gitignore使用以下内容创建文件:
foo.txt # matches all files 'foo.txt' in any directory under bar/
热门推荐
10 小红书平安祝福语简短
11 生日祝福语大全女孩简短
12 收生日红包祝福语 简短
13 领证幽默祝福语简短
14 法考面试祝福语简短
15 老哥出门祝福语简短语
16 送灯祝福语简短独特
17 幼儿狗年祝福语大全简短
18 好听的元旦简短祝福语