对于提交,它显示日志消息和文本差异
以 git 生成的特殊格式显示合并提交
Diff-tree CC.
来自 Git Help
您不需要编写 HEAD 或上次提交的 SHA-1,只需键入 git show。
我认为这将有助于您的需要,以及其他的答案,但少一点打字和更多的信息取决于情况。
在这里,我添加了一个 git show实际显示的例子:
>> git show
commit 49832d33b5329fff95ba0a86002ee8d5a762f3ae (HEAD -> my_new_branch, master)
Author: Abimael Domínguez <my_mail@mail.com>
Date: Thu Jan 7 13:05:38 2021 -0600
This is the commit message of the last commit
diff --git a/some_folder/some_file.txt b/some_folder/some_file.txt
index 59fb665..5c36cde 100644
--- a/some_folder/some_file.txt
+++ b/some_folder/some_file.txt
@@ -3,6 +3,6 @@
This is the content of the last updated file
some text
some text
-text deleted
+text added
some text
some text