git pull 之后 有文件改变了 如何查看文件的具体改变情况?

2014-10-22 16:04:19 +08:00
 no13bus
11514 次点击
所在节点    问与答
6 条回复
chemzqm
2014-10-22 16:16:21 +08:00
git diff [options] <commit> <commit> [--] [<path>...]
no13bus
2014-10-22 18:58:35 +08:00
git diff HEAD^ HEAD
zsh: no matches found: HEAD^

$ git diff HEAD\^ HEAD
成功.
用的zsh 发现head后面的^需要转意
yangg
2014-10-22 19:34:02 +08:00
git show # view the diff of last commit
git whatchanged
git log --stat --date=relative
spritevan
2014-10-22 20:10:02 +08:00
git log -p path_to_file
vibbow
2014-10-23 01:35:16 +08:00
sourcetree
julyclyde
2014-10-23 22:39:55 +08:00
如果pull的时候merge进来很多commit
就不能用HEAD和HEAD~1比较了吧?

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

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

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

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

© 2021 V2EX