开发者

Exclude all files under all nested directories from a git diff, using .git/info/attributes

开发者 https://www.devze.com 2023-02-08 00:14 出处:网络
I need to permanently exclude all files under one directory and all its subdir开发者_运维问答ectories from git diff, using .git/info/attributes

I need to permanently exclude all files under one directory and all its subdir开发者_运维问答ectories from git diff, using .git/info/attributes

adding "-diff" lines in attributes works greatly for one level, but I couldn't find a way to do that recursively

so for dir/dir1/dir2/dir3/dir4/dir5/.. and files under all of them, dir/* -diff works for one level, dir/**/* -diff works for the second level, and so on.

Can this be done with one line?


Remove the * and just use dir/ -diff.

Or better yet, use * -diff and put the .gitattributes file in the dir directory.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号