按:Difference between git-log and git-whatchanged?
Encourage new users to use 'log' instead. These days, these commands are unified and just have different defaults.
我最近才发现
git whatchanged
但发现它的输出:commit deadbeefdeadbeefdeadbeefdeadbeefdeadbeef
Author: Egg Sample <mail@example.com>
Date: Mon Jan 28 16:32:04 2019 -0800
change some files
:100777 100644 abaddad1 feeb1e42 M src/changemymode.txt
:100644 100644 1234abcd abcd1234 M src/changemycontent.txt
:000000 100755 00000000 6600abcd A src/addme.txt
:100755 000000 feed1bee 00000000 D src/deleteme.txt
对我最近的特定工作流程很有用(涉及具有许多文件模式更改的分支)。出于好奇,我需要做什么才能制作
git log
以这种方式行事,即:Modified|Added|Deleted
和更改文件的文件名 git whatchanged
行为)。 我想这可能是
--stat
中的东西或 --format
选项,但 git log --help
似乎没有提到与这些选项一起打印文件模式和对象哈希的任何内容,并且对所述文档的快速扫描并没有让我感到意外。
最佳答案
只是为了让这个问题没有悬而未决:
以此 revised answer , 较新版本的 git 在 man git-whatchanged
上对此进行了解释
The whatchanged command is essentially the same as git-log(1) but defaults to show the raw format diff output and to skip merges.
所以:
git log --raw --no-merges
关于git - 需要在 `git log` 上设置哪些标志才能使其具有与 `git whatchanged` 相似的输出?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54412432/