Git diff between current branch and master but not including unmerged master commits

前端 未结 4 1862
长情又很酷
长情又很酷 2021-01-29 20:17

I want a diff of all changes in a branch that is not merged to master yet.

I tried:

git diff master
git diff branch..master
git diff branch...master
         


        
4条回答
  •  滥情空心
    2021-01-29 21:08

    Here's what worked for me:

    git diff origin/master...
    

    This shows only the changes between my currently selected local branch and the remote master branch, and ignores all changes in my local branch that came from merge commits.

提交回复
热议问题