如题,要获得两个版本间所有(增加/修改/删除)的文件列表,应该使用什么命令呢?
拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...
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
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
The <commit> above represents the hash string generated by submitting,
For example:
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 commit-SHA1 commit-SHA2 --stat