Git - 如何从给定范围内的提交中获取所有消息?

时间:2012-11-01 15:07:45

标签: git

有没有简单的方法可以只将提交消息作为纯文本,输出中没有任何其他信息?

4 个答案:

答案 0 :(得分:3)

我认为git log --pretty=format:%B <from>..<to>就是你所追求的目标。

e.g。对于我的一个项目:

$ git log --pretty=format:%B 35548842b09..HEAD

Changes quoting to fix transcoding on windows

Removes an unneeded puts statement

Updates the readme

Updates streamroller.bat

答案 1 :(得分:0)

您可以使用此命令执行此操作:

git log --since --before

for more info

答案 2 :(得分:0)

git log --format=format:%b仅显示提交正文,或git log --format=format:%s主题,没有任何其他信息。

答案 3 :(得分:0)

试试git log --format=%B。请尝试man git-log以获取更多选项。