search

Home  >  Q&A  >  body text

Git如何获得两个版本间所有变更的文件列表

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

高洛峰高洛峰2810 days ago763

reply all(4)I'll reply

  • 天蓬老师

    天蓬老师2017-04-21 11:19:00

    git diff --name-status HEAD~2 HEAD~3

    Please refer to the documentation for details

    reply
    0
  • 怪我咯

    怪我咯2017-04-21 11:19:00

    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

    reply
    0
  • PHP中文网

    PHP中文网2017-04-21 11:19:00

    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

    reply
    0
  • 高洛峰

    高洛峰2017-04-21 11:19:00

    git diff commit-SHA1 commit-SHA2 --stat

    reply
    0
  • Cancelreply