#显示当前分支的版本历史
[root@MiWiFi-R3A-srv git_practice1]# git status
On branch master
nothing to commit, working tree clean
#显示当前分支的版本历史
[root@MiWiFi-R3A-srv git_practice1]# git log
commit 6d62ce28743ee47ba7073674c812ec077044fa4c
Author: yongfengnice <[email address]>
Date: Mon Apr 13 01:33:04 2020 +0800
commit myfile.txt
#显示commit历史,以及每次commit发生变更的文件
[root@MiWiFi-R3A-srv git_practice1]# git log --stat
commit 6d62ce28743ee47ba7073674c812ec077044fa4c
Author: yongfengnice <[email address]>
Date: Mon Apr 13 01:33:04 2020 +0800
commit myfile.txt
myfile.txt | 0
1 file changed, 0 insertions(+), 0 deletions(-)
#显示过去5次提交
[root@MiWiFi-R3A-srv git_practice1]# git log -5 --pretty --oneline
6d62ce2 commit myfile.txt
#显示所有提交过的用户,按提交次数排序
[root@MiWiFi-R3A-srv git_practice1]# git shortlog -sn
1 yongfengnice
#显示暂存区和工作区的差异
[root@MiWiFi-R3A-srv git_practice1]# git diff
网友评论