Git的历史操作记录

10 篇文章 0 订阅
10 篇文章 0 订阅
#查看Git的历史操作记录    commit提交一次 就会记录一次日志  

[root@git ~/git_test]# git log
commit 8e84d3462fce9f1fe6b56a190b1a515212c2fe5f
Author: qls <qls@qq.com>
Date:   Mon May 11 15:20:08 2020 +0800

    modify a.txt 1

commit 51104b96b305351bcbf08ddbd83cb7167c658555
Author: qls <qls@qq.com>
Date:   Mon May 11 15:02:07 2020 +0800

    rename a.log a.txt

commit 234503297f750b1444f5547cb9d5f4f5037c181e
Author: qls <qls@qq.com>
Date:   Mon May 11 14:58:36 2020 +0800

    rename a.txt  a.log

commit c3e5985373c4b5356532e09cdae978105877a773
Author: qls <qls@qq.com>
Date:   Mon May 11 14:50:43 2020 +0800

    add new files

#使用一行内容显示每次的commit提交
[root@git ~/git_test]# git log --oneline 
8e84d34 modify a.txt 1
51104b9 rename a.log a.txt
2345032 rename a.txt  a.log
c3e5985 add new files

#显示当前所在分支的指针 
[root@git ~/git_test]# git log --oneline  --decorate
8e84d34 (HEAD, master) modify a.txt 1
51104b9 rename a.log a.txt
2345032 rename a.txt  a.log
c3e5985 add new files


#显示日志中具体的信息 

[root@git ~/git_test]# git log  -p


#只显示最近的几条日志  


[root@git ~/git_test]# git log  -1
commit 8e84d3462fce9f1fe6b56a190b1a515212c2fe5f
Author: qls <qls@qq.com>
Date:   Mon May 11 15:20:08 2020 +0800

    modify a.txt 1

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值