git辅助命令
git log
$ git log -h
usage: git log [<options>] [<revision-range>] [[--] <path>...]
or: git show [<options>] <object>...
-q, --quiet suppress diff output
--source show source
--use-mailmap Use mail map file
--mailmap alias of --use-mailmap
--decorate-refs <pattern>
only decorate refs that match <pattern>
--decorate-refs-exclude <pattern>
do not decorate refs that match <pattern>
--decorate[=...] decorate options
-L <n,m:file> Process line range n,m in file, counting from 1
for instance:
$ git log
commit 4187162b7d40ec9ac17fcf57c8a1f42896d26df1 (HEAD -> develop, web/master, master)
Author: Getone超 <1509670272@qq.com>
Date: Mon Mar 8 23:56:38 2021 +0800
修改了CNAME域名错误的问题
commit 8925a0489bf576b70002670e149a6473f53f9476
Author: Getone超 <1509670272@qq.com>
Date: Mon Mar 8 23:49:39 2021 +0800
添加了CNAME README
commit 6fbe5787324d44bb2a17f88589c277b9d578f7a4
Author: Getone超 <1509670272@qq.com>
Date: Mon Mar 8 23:32:21 2021 +0800
first commit +index.html
$ git log --oneline
4187162 (HEAD -> develop, web/master, master) 修改了CNAME域名错误的问题
8925a04 添加了CNAME README
6fbe578 first commit +index.html
$ git log --graph 图形化
* commit 018ab12bfdacc63de7e20debbbcc2c0b12d478f9 (HEAD -> develop)
| Author: Getone超 <1509670272@qq.com>
| Date: Tue Mar 9 11:20:22 2021 +0800
|
| 改变了index.html文件
|
* commit 4187162b7d40ec9ac17fcf57c8a1f42896d26df1 (web/master, master)
| Author: Getone超 <1509670272@qq.com>
| Date: Mon Mar 8 23:56:38 2021 +0800
|
| 修改了CNAME域名错误的问题
|
* commit 8925a0489bf576b70002670e149a6473f53f9476
| Author: Getone超 <1509670272@qq.com>
| Date: Mon Mar 8 23:49:39 2021 +0800
|
| 添加了CNAME README
|
* commit 6fbe5787324d44bb2a17f88589c277b9d578f7a4
Author: Getone超 <1509670272@qq.com>
Date: Mon Mar 8 23:32:21 2021 +0800
first commit +index.html
$ git log -p //显示每一次提交与上一次提交的差异
commit 018ab12bfdacc63de7e20debbbcc2c0b12d478f9 (HEAD -> develop)
Author: Getone超 <1509670272@qq.com>
Date: Tue Mar 9 11:20:22 2021 +0800
改变了index.html文件
diff --git a/index.html b/index.html
index e69de29..9f26324 100644
--- a/index.html
+++ b/index.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset='utf-8'>
+ <meta http-equiv='X-UA-Compatible' content='IE=edge'>
+ <title>Page Title</title>
+ <meta name='viewport' content='width=device-width, initial-scale=1'>
+ <link rel='stylesheet' type='text/css' media='screen' href='main.css'>
+ <script src='main.js'></script>
+</head>
+<body>
+ hello world!
:
$ git log -2
commit 018ab12bfdacc63de7e20debbbcc2c0b12d478f9 (HEAD -> develop)
Author: Getone超 <1509670272@qq.com>
Date: Tue Mar 9 11:20:22 2021 +0800
改变了index.html文件
commit 4187162b7d40ec9ac17fcf57c8a1f42896d26df1 (web/master, master)
Author: Getone超 <1509670272@qq.com>
Date: Mon Mar 8 23:56:38 2021 +0800
修改了CNAME域名错误的问题
$ git log --stat
commit 018ab12bfdacc63de7e20debbbcc2c0b12d478f9 (HEAD -> develop)
Author: Getone超 <1509670272@qq.com>
Date: Tue Mar 9 11:20:22 2021 +0800
改变了index.html文件
index.html | 15 +++++++++++++++
1 file changed, 15 insertions(+)
commit 4187162b7d40ec9ac17fcf57c8a1f42896d26df1 (web/master, master)
Author: Getone超 <1509670272@qq.com>
Date: Mon Mar 8 23:56:38 2021 +0800
修改了CNAME域名错误的问题
CNAME | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 8925a0489bf576b70002670e149a6473f53f9476
Author: Getone超 <1509670272@qq.com>
Date: Mon Mar 8 23:49:39 2021 +0800
添加了CNAME README
CNAME | 1 +
README | 1 +
2 files changed, 2 insertions(+)
commit 6fbe5787324d44bb2a17f88589c277b9d578f7a4
Author: Getone超 <1509670272@qq.com>
Date: Mon Mar 8 23:32:21 2021 +0800
first commit +index.html
index.html | 0
1 file changed, 0 insertions(+), 0 deletions(-)