Get the difference between two branches in Git

后端 未结 3 1475
無奈伤痛
無奈伤痛 2020-12-22 23:23

I did following (I simplified this comparing to a reality):

  • created a branch Branch1, switched to it
  • added file File1
3条回答
  •  隐瞒了意图╮
    2020-12-23 00:20

    This is a simple git diff

    git diff --name-only SHA1 SHA2
    

    Where SHA1/2 are the hashes of the 2 commits at the top of each branch.

    Or you can do

    git diff --name-only develop...
    

    To compare your branch against the develop branch

提交回复
热议问题