4 ms·
The question in your example seems odd to me. It can be interpreted as either 2 OR 3 unique branches depending on how you read it. There is either base branch
by dgfitz 3y ago
The question in your example seems odd to me. It can be interpreted as either 2 OR 3 unique branches depending on how you read it.
There is either base branch A whose current head is commit #2 / branch B with head of commit #3.
OR
Commit #1 is branch “default” commit #2 is branch “A” with parent as commit #1 and commit is branch “B” with parent also as commit #1
Consider your same example with forking instead of branching, how would the issue be resolved?
- Dylan16807 3y ago> It can be interpreted as either 2 OR 3 unique branches depending on how you read it. The question isn't how many branches, it's what branch the commit was on at the point in time it was created. That's not up to interpretation. It's information that was not recorded. > Consider your same example with forking instead of branching, how would the issue be resolved? Forked repositories don't have IDs, don't generally keep track of each other, and there's no way to even count them. So that's not solvable. But branches do have names, and you almost always make commits onto branches. We shouldn't give up on tracking branches just because tracking forks is hard.