比如比对当前 HEAD 和上一个版本更新时我修改了哪些文件
比如比对当前 HEAD 和上一个版本更新时我修改了哪些文件
|
1
或者可以通过 grep 过滤出来?
|
|
bingoAIJun 9, 2017
2
git reflog 查看 hash id 号
git diff id1 id2 |
|
cxbigJun 9, 2017
3
具体实现看 git diff 和 git log 文档,这种问题 Google 比较快。
|
|
4
@jiangbingo 这个方法并不能过滤某一个作者的提交。假设开发团体够大的话,想要找到自己提交的东西也是挺难的
|
|
blakejiaJun 9, 2017
7
我觉得 git blame 应该贴合你需求一点。但是一个命令估计也解决不了。
|
|
blakejiaJun 9, 2017
8
应该是 git log 拿到文件列表,和 Hash ID,然后去对应文件找你有动过的那些行,做个列表打印出来。得写个小工具了
|
|
cxbigJun 9, 2017
9
@zo
参数怎么用说的明明白白啊: https://git-scm.com/docs/git-log#git-log---authorltpatterngt 可以加--branches 过滤分支 可以加--before 和--after 过滤提交时间 先用 git log 搜你提交的历史,拿到 hash 再用 git diff 比较版本间文件改动 |
|
wlsnxJun 9, 2017
12
git log 有 --stat 可以显示修改了哪些文件,-p 可以看到修改内容
|
|
momocraftJun 9, 2017
13
git show commit1..commit2 --author=你
|
|
SoloCompanyJun 10, 2017
15
|
|
mingyunJun 10, 2017
16
@SoloCompany 学习了
|
|
bingoAIJun 10, 2017
17
根本需求在于快速查看代码提交者的 commit,那就直接使用 Pcharm 的 version control 吧。
|