git - 是否可以一起显示简短日志和更改摘要?

时间:2016-09-15 00:47:27

标签: git

有两个命令以单行格式显示日志,以及两个提交之间的摘要:

$ git log --oneline -3
450a63c Add some tests for enum option scoped
4a959f7 Make enum values children of enums when option scoped is specified on the enum, and handle this in the C++ generator by prefixing the enum values with the name of the enum type.
b1649ac Add option scope to EnumOptions

$ git diff --stat --summary b1649ac..450a63c
 benchmarks/readme.txt               |  22 +++++++++-------------
 csharp/src/Reflection/Descriptor.cs |  94 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------
 docs/third_party.md                 |   1 +
 protobuf.bzl                        |   4 ++--

是否可以将每个提交与更改的摘要一起显示?如下:

$ git ???
450a63c Add some tests for enum option scoped
 benchmarks/readme.txt               |  22 +++++++++-------------

4a959f7 Make enum values children of enums
 docs/third_party.md                 |   1 +
 protobuf.bzl                        |   4 ++--

b1649ac Add option scope to EnumOptions
 csharp/src/Reflection/Descriptor.cs |  94 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------

1 个答案:

答案 0 :(得分:3)

git log --oneline --stat

示例:

2a85630 Fix bug, export button cannot export value '0'
 forms/gridfield/GridFieldExportButton.php           |  2 +-
 tests/forms/gridfield/GridFieldExportButtonTest.php | 18 ++++++++++++++++--
 tests/forms/gridfield/GridFieldExportButtonTest.yml |  2 ++
 3 files changed, 19 insertions(+), 3 deletions(-)

c401d9d new added hide_from_cms_tree and hide_from_hierarchy
 model/Hierarchy.php           | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++----
 tests/model/HierarchyTest.php | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++--
 tests/model/HierarchyTest.yml | 12 ++++++++++++
 3 files changed, 121 insertions(+), 6 deletions(-)

79d0590 BUG Fix singleton('DBLocale')
 model/fieldtypes/DBLocale.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)