GIT - How to know the branch a branch branched from?

前端 未结 4 625
广开言路
广开言路 2021-01-11 15:19

Support I create multiple branches (aaa, bbb, ccc) from a commit. Then, I create a new branch (ffffd) from one of the branch (bbb) and a make a commit on it.

Then I p

4条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-11 16:08

    Branches are simply pointers to commits. Because of this, it is not possible to see where a branch originated from, other than observing that two branches have an identical history up to some point.

    For someone upstream, it is not relevant where a branch originated from, only that it contains a certain commit (or sequence of commits). This determines how/if git is able to fast-forward or merge branches together.

提交回复
热议问题