Finding a branch point with Git?

前端 未结 22 1547
小鲜肉
小鲜肉 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:37

    After a lot of research and discussions, it's clear there's no magic bullet that would work in all situations, at least not in the current version of Git.

    That's why I wrote a couple of patches that add the concept of a tail branch. Each time a branch is created, a pointer to the original point is created too, the tail ref. This ref gets updated every time the branch is rebased.

    To find out the branch point of the devel branch, all you have to do is use devel@{tail}, that's it.

    https://github.com/felipec/git/commits/fc/tail

提交回复
热议问题