3 ms·
> But in merge commits with several parents all parents are considered equal, and the system does not contain info about which commit belonged to the "main bran
by nyanpasu64 6y ago
> But in merge commits with several parents all parents are considered equal, and the system does not contain info about which commit belonged to the "main branch" and which was imported in.
I thought that merge commits stored an ordered list of parents, and the first parent is generally the main branch, and second parent is a side branch.
- mikeyjk 6y agoIt does! I'm not sure what that person is referring to. git log can even use ASCII art to depict the relationship. Most modern git web frontends depict the relationship. Sourcetree, gitkraken depict the parent relationships. I wonder if we're misinterpreting? But the parents are distinct from one another, the hierarchy is not lost on merge. Part of the reason I prefer merge commits rather than rebasing.
- smichel17 6y agoNote: they don't have to be exclusive. You can rebase a branch so the history is linear, then merge --no-ff and create a merge commit for it. This gets you something like the best and worst of both worlds.