Finding a branch point with Git?

前端 未结 22 1669
小鲜肉
小鲜肉 2020-11-22 10:11

I have a repository with branches master and A and lots of merge activity between the two. How can I find the commit in my repository when branch A was created based on mast

22条回答
  •  面向向阳花
    2020-11-22 10:45

    How about something like

    git log --pretty=oneline master > 1
    git log --pretty=oneline branch_A > 2
    
    git rev-parse `diff 1 2 | tail -1 | cut -c 3-42`^
    

提交回复
热议问题