Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1712855
  • 博文数量: 143
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1462
  • 用 户 组: 普通用户
  • 注册时间: 2016-08-23 11:14
文章分类

全部博文(143)

文章存档

2022年(3)

2021年(13)

2020年(21)

2019年(8)

2018年(28)

2017年(7)

2016年(63)

我的朋友

分类: LINUX

2020-04-28 16:58:58

使用git log -- 查看某文件的增,删,改,重命名等等。
直接查看该文件的所有上库状态
git log --name-status --
或,直接过滤该文件的某些上库状态
git log --diff--filter=ADMR --
查看该文件所变动的文件档案和行数
git log --stat --
git log --shortstat --
常用,如
git log --name-status --oneline -- */suprv_qec_cal.c

git log --numstat --oneline -- */suprv_qec_cal.c
还有
git log --diff-filter=R --oneline -- */suprv_qec_cal.c

另外,

--full-diff
百搭, 如git log --full-diff -p , 或者produced by --stat(如git log --stat --full-diff -- ), 或者(git log --name-status --full-diff -- ).
(--full-diff的解释可参考: )
--sumary
这个参数感觉没啥大用, 虽然它给本章中所有参数都能百搭, 它只能“Output a condensed summary of extended header information such as creations, renames and mode changes.”, 像Modify的文件就显示不出来. 而--name-status就比它全的多。

另外,
查看某文件中某函数的修改历史
git log -L :FunctionName:FilePath
(From: git查看函数修改历史)
阅读(1730) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~