root\
sub1\
sub2\
components\
sub3\
states\
core\
...
我现在想找到所有的 commits ,这些 commits 里面包含有文件在 root\sub2\components\ or root\sub3\states\core\ 下面(在它们的子目录下也算在内)?
谢谢
1
dinghmcn 2021 年 11 月 5 日
git log root\sub2\components\
不行吗? 子目录也算在内 |
2
silenceboychen 2021 年 11 月 5 日
git log root\sub2\components or git log root\sub3\states\core
|
3
dinghmcn 2021 年 11 月 5 日
@dinghmcn #1 要同是显示这两个目录可以:
git log -- root\sub2\components\ root\sub3\states\core\ git log -h 看看语法,path 可以多个 |
4
shellus 2021 年 11 月 5 日
IDEA:打开文件或者选择目录的情况下,点击右上角的时钟图标,下方 git 工具栏就是更改了本文件的所有 commit 列表,点击 commit ,或者多选 commit ,右侧出现影响的文件的 diff 列表,双击可查看更改差异
yyds |
5
ryncv 2021 年 11 月 5 日
推荐一个工具: tig 可以很方便实现你要的效果 直接 tig sub2 就可以
|
6
yazoox OP 试了试命令
git log d07cc202a..HEAD --oneline -- path/to/my-filder 是可以工作的。 楼主的工具我也会去试试。 谢谢! |
7
risky 2021 年 11 月 6 日
可以试试 git kraken 功能很强
|