git diff noindex排除文件 [英] git diff noindex exclude files
本文介绍了git diff noindex排除文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在与git diff --no-index比较文件夹时,是否有人如何排除文件?似乎此选项
Does any one how to exclude files when comparing folders with git diff --no-index ? It seems this option
':(exclude)*.min.css'
不适用于无索引(外部工作树)
does not work with no-index (outside working tree)
推荐答案
pathspec :(排除)及其缩写形式:!或:^ 仅在Git工作树中可用。
The pathspec :(exclude) and its short form :! or :^ is available only within a Git working tree.
因此:
- ,如已注释的那样,您可以将其放入(临时)git本地存储库(git init。+ git add)或
- ,您需要执行
git diff --no-index
在find -exec
带有排除指令的命令。
- either, as commented, you can put it in a (temporary) git local repo (git init . + git add) or
- you would need to do your
git diff --no-index
in afind -exec
command with exclude directives.
这篇关于git diff noindex排除文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文