gpt4 book ai didi

git - 需要在 `git log` 上设置哪些标志才能使其具有与 `git whatchanged` 相似的输出?

转载 作者:行者123 更新时间:2023-12-01 04:30:53 26 4
gpt4 key购买 nike

按: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和更改文件的文件名
  • 而不是差异本身
  • (默认情况下排除 merge ,也称为 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/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com