Lerix的git学习笔记(5)_查看提交历史

查看提交历史

简单查看

需要在对应的工作目录中,使用以下命令;

git log

如下输出:

Author: Lerix <185734549@qq.com>
    Date:   Fri Mar 29 14:13:16 2019 +0800

写04章

commit 67eab61eb5901940f9ddc0d62475ffd84f5ce521
Author: Lerix <185734549@qq.com>
Date:   Fri Mar 29 13:56:32 2019 +0800

new file delete

commit 9535b0152dfa2ea44b056411c1705fecfd152b70
Author: Lerix <185734549@qq.com>
Date:   Fri Mar 29 13:55:21 2019 +0800

new file

commit c0fe67e65e6e8263909d4974e42ee99069691868
Author: Lerix <185734549@qq.com>
Date:   Fri Mar 29 13:04:29 2019 +0800

定制查看

git log可以使用很多命令选项使输出变得丰富,尤其是,git log支持格式化输出,每个人都可以自己定义输出样式类型。

git log --pretty=format:"%h - %an, %ar : %s"

输出格式如下:

2cb8e74 - Lerix, 10 minutes ago : 写04章
67eab61 - Lerix, 27 minutes ago : new file delete
9535b01 - Lerix, 28 minutes ago : new file
c0fe67e - Lerix, 79 minutes ago : test-3
df0c34d - Lerix, 3 hours ago : test git
efba7e2 - Leirx, 2 days ago : Initial commit
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值