Get all files that have been modified in git branch

后端 未结 16 1659
深忆病人
深忆病人 2020-12-02 04:14

Is there a way to see what files have changed in a branch?

16条回答
  •  醉酒成梦
    2020-12-02 04:31

    I use grep so I only get the lines with diff --git which are the files path:

    git diff branchA branchB | grep 'diff --git'
    // OUTPUTS ALL FILES WITH CHANGES, SIMPLE HA :)
    diff --git a/package-lock.json b/package-lock.json
    

提交回复
热议问题