我列出了在两个不同标签之间发生变化的文件
git diff --name-only v2.1.1 v2.1.2
Run Code Online (Sandbox Code Playgroud)
结果如下:
test/file1
test/file2
www/file3
www/file4
Run Code Online (Sandbox Code Playgroud)
有什么方法可以限制它只列出www /文件夹中的文件
来自git-diff文档......
git diff [--options] <commit> <commit> [--] [<path>...]
This is to view the changes between two arbitrary <commit>.
Run Code Online (Sandbox Code Playgroud)
在--明确地告诉混帐什么是承诺,什么是一个路径.所以在你的情况下.
git diff --name-only v2.1.1 v2.1.2 -- www/
Run Code Online (Sandbox Code Playgroud)