Using Git, show all commits that exist *only* on one specific branch, and not *any* others

后端 未结 8 1485
小蘑菇
小蘑菇 2020-12-07 08:17

Given a branch, I\'d like to see a list of commits that exist only on that branch. In this question we discuss ways to see which commits are on one branch

8条回答
  •  攒了一身酷
    2020-12-07 09:04

    @Prakash answer works. Just for clarity ...

    git checkout feature-branch
    git log master..HEAD
    

    lists the commits on feature-branch but not the upstream branch (typically your master).

提交回复
热议问题