小编Blu*_*lue的帖子

使用git log显示合并期间更改的文件

我正在执行以下命令:

git log --name-only –pretty="format:%H %s" -- *.sql --grep="JIRA-154"
Run Code Online (Sandbox Code Playgroud)

返回格式的结果:

[commitid1] [comment]
path/to/file1/file1.sql
path/to/file2/file2.sql
path/to/file3/file3.sql

[commitid2] [comment]
path/to/file2/file2.sql
path/to/file4/file4.sql
Run Code Online (Sandbox Code Playgroud)

输出被重定向到一个文件,格式正是我正在寻找的,但合并提交是一个问题.从未列出作为合并的一部分而更改的文件.相反,我最终会得到以下内容:

[commitid3] [merge comment]
[commitid4] [comment]
path/to/file3/file3.sql
Run Code Online (Sandbox Code Playgroud)

我显然在这里误解了一些东西,因为我希望看到合并期间发生变化的文件.有没有办法在输出中包含这些文件?

git merge git-log

14
推荐指数
1
解决办法
4827
查看次数

标签 统计

git ×1

git-log ×1

merge ×1