Git 仅获取 INI 文件的差异列表 - Windows 7

Git Diff get list of only INI files - Windows 7

这就是我在 Mac 时的使用方式。

git diff refs/tags/l-build..HEAD --name-only $(find . -name *\.ini)  >> log.txt

但我要搬回 Windows。我使用 git-bash

得到这个错误
fatal: ambiguous argument '$(find': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

我认为 Windows Bash 在 Windows 10 上不会有问题,但我必须使用 Windows 7,因为我有一些重要软件的限制在我的工作中每天使用。

使用此命令先过滤掉 .ini 个文件,然后应用 git diff 命令。

git ls-files -m | grep '.ini'

综合如下:

git diff `git ls-files -m | grep .ini`