git diff noindex排除文件 [英] git diff noindex exclude files

查看:130
本文介绍了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.

因此:

  • 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 a find -exec command with exclude directives.

这篇关于git diff noindex排除文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆