Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
git diff命令,用于在检查尾部空白错误时排除某些文件类型_Git_Github - Fatal编程技术网

git diff命令,用于在检查尾部空白错误时排除某些文件类型

git diff命令,用于在检查尾部空白错误时排除某些文件类型,git,github,Git,Github,我想检查两次git提交之间的尾随空格错误,以下命令对我来说很好: git diff ${prev_commit_ID}..${current_commit_ID} --check --relative 请帮助我修改此命令以排除某些文件类型,如*.txt、*.pl、*.groovy等 git diff ${prev_commit_ID}..${current_commit_ID} --check --relative -- . ':!*.txt' ':!*.pl' ':*.groovy' 表示

我想检查两次git提交之间的尾随空格错误,以下命令对我来说很好:

git diff ${prev_commit_ID}..${current_commit_ID} --check --relative
请帮助我修改此命令以排除某些文件类型,如*.txt、*.pl、*.groovy等

git diff ${prev_commit_ID}..${current_commit_ID} --check --relative -- . ':!*.txt' ':!*.pl' ':*.groovy'
表示目录下的所有文件


:!*。txt
排除
.txt
文件。

如果您想发布完整的答案,可能需要一些解释。。。您还可以包括一个文档链接。