怎么查看 Git 工程远端某分支上,两次提交之间,某个用户修改过的文件的列表?

2018-12-10 14:07:05 +08:00
 xudzhang
1796 次点击
所在节点    git
3 条回复
hongch
2018-12-10 15:06:58 +08:00
git checkout [第二次提交节点]
git diff
这样不就可以看见第二次在第一次的基础上修改了哪些文件?
SingeeKing
2018-12-10 15:38:21 +08:00
git-diff - Show changes between commits, commit and working tree, etc

git diff [<options>] <commit> <commit> [--] [<path>...]
This is to view the changes between two arbitrary <commit>.

--name-status
Show only names and status of changed files. See the description of
the --diff-filter option on what the status letters mean.

因此用法:git diff --name-status 提交 1 提交 2
wjfz
2018-12-10 17:38:02 +08:00
checkout 到本地,找到两次提交的日期

git log --author="你想查的用户名" --since=2018-12-05 --before=2018-12-10 --oneline --name-status


感谢楼上提供--name-status 这个参数,看了下 git log 命令也支持这个参数。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/516113

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX