A repository's main branch has commits

PHYSICS · Multi-part · Fermi University Physics · Computational Physics · Research software practice, verification and validation · Research software practice, verification and validation

Scientific Computing for Physicists, Ch A repository others can build on: collaboration, history and workflows

Problem

A repository's main branch has commits C1→C2C_1 \to C_2, with C2C_2 the current tip. A branch named boundary is created at C2C_2, and three further commits C3,C4,C5C_3, C_4, C_5 are made only on boundary; main receives no new commits in the meantime. The boundary branch is then merged into main. ((a)) State the parent commit(s) of main's tip immediately after the merge, and say whether a separate merge commit is created. ((b)) Name the type of merge this is, and explain why in terms of whether main had diverged. ((c)) Suppose instead that, before the merge, main had received one extra commit C6C_6 (made directly on main after C2C_2, independently of boundary). How many parents would the resulting merge commit have, and what type of merge is this now?

Browse the problem library