Git如何获得两个版本间所有变更的文件列表
高洛峰
高洛峰 2017-04-21 11:17:00
0
4
755

如题,要获得两个版本间所有(增加/修改/删除)的文件列表,应该使用什么命令呢?

高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

reply all(4)
Peter_Zhu
git diff --name-status HEAD~2 HEAD~3

Please refer to the documentation for details

刘奇

git diff hash1 hash1 --stat

If it’s a branch

git diff branch1 branch2 --stat

Add --stat to display the file list, otherwise it will be a diff of the file content

洪涛
git diff <commit> <commit>

The <commit> above represents the hash string generated by submitting,
For example:

git diff b45ba47d1b297217e3ec6a3ab0f61716a8d6ecbc c244d0bf06d56ec86aaedeefa5dcd84dd9febc60

Generally speaking, the distinction can be made by the first 4 to 6 digits of the hash string, which can be abbreviated as:

git diff b45b 355e
小葫芦

git diff commit-SHA1 commit-SHA2 --stat

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template