#查看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
Git的历史操作记录
最新推荐文章于 2023-04-18 09:00:00 发布