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

后端 未结 8 1511
小蘑菇
小蘑菇 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 08:51

    Another variation of the accepted answers, to use with master

    git log origin/master --not $(git branch -a | grep -Fv master)

    Filter all commits that happen in any branch other than master.

提交回复
热议问题