gpt4 book ai didi

Git - .gitignore 忽略整个 repo 中的文件夹

转载 作者:太空狗 更新时间:2023-10-29 13:49:42 24 4
gpt4 key购买 nike

有没有可能

foo/ 

在 .gitignore 中但不要忽略

 bar/foo

不添加

 !bar/foo

到.gitignore

最佳答案

改用/foo//匹配路径的开头。来自gitignore手册页:

A leading slash matches the beginning of the pathname. For example, "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c".

关于Git - .gitignore 忽略整个 repo 中的文件夹,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13879394/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com