git diff noindex exclude files

故事扮演 提交于 2020-07-19 04:45:35

问题


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)


回答1:


The pathspec :(exclude) and its short form :! or :^ is available only within a Git working tree.

So:

  • 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.


来源:https://stackoverflow.com/questions/53471209/git-diff-noindex-exclude-files

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!