当前位置:   article > 正文

运维之道 | Git log 命令详解_git log r065 r082 m a d

git log r065 r082 m a d

Git log 命令详解

  • Git log 可以让我们查看提交commit history
[root@localhost villian]# git log
commit 7a690b414f87fbbe746338d247260021a51a43e2
Author: root <root@localhost.localdomain>
Date:   Sat Oct 26 16:49:16 2019 +0800

    home_fourth

commit f9828f5273b60638b9f67f135cd4d4b74f3ddb9f
Author: root <root@localhost.localdomain>
Date:   Sat Oct 26 16:46:55 2019 +0800

    home_third

commit 2afde91ff027301499b77cd940b651dda18d5bae
Author: root <root@localhost.localdomain>
Date:   Sat Oct 26 16:38:07 2019 +0800

    home_next

commit 9e6906339361841d1c8b27a4cca91ddc4dba0b99
Author: root <root@localhost.localdomain>
Date:   Sat Oct 26 16:04:23 2019 +0800

    home_first
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • git log默认会输出commit hash, author, date, commit message

git参数详解:

1、 --oneline

  • 这个命令简化git log的默认的输出,仅仅输出commit hash 前7个字符串和commit message.
[root@localhost villian]# git log --oneline
7a690b4 home_fourth
f9828f5 home_third
2afde91 home_next
9e69063 home_first
  • 1
  • 2
  • 3
  • 4
  • 5

2、–stat

  • –stat:是在git log 的基础上输出文件增删改的统计数据(不显示具体修改内容)
[root@localhost villian]# git log --stat
commit 7a690b414f87fbbe746338d247260021a51a43e2
Author: root <root@localhost.localdomain>
Date:   Sat Oct 26 16:49:16 2019 +0800

    home_fourth

 home.txt | 1 +
 1 file changed, 1 insertion(+)

commit f9828f5273b60638b9f67f135cd4d4b74f3ddb9f
Author: root <root@localhost.localdomain>
Date:   Sat Oct 26 16:46:55 2019 +0800

    home_third

 home.txt | 1 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/菜鸟追梦旅行/article/detail/663949
推荐阅读
相关标签
  

闽ICP备14008679号