• bleistift2@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    2 days ago

    A commit all by itself doesn’t mean as much without context.

    Luckily a commit points to its parent, which means the context is inherently present. What’s your point?

    Why would I not want to be able to apply a commit to any arbitrary branch?

    Nobody said that.

    Any shortcomings it may have aren’t necessarily due to a flaw in git.

    True enough.

    • SpaceNoodle@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      2 days ago

      Your claim appears to be that Mercurial binds commits to branches, and I’m explaining how I fail to see the advantage.

          • alsimoneau@lemmy.ca
            link
            fedilink
            arrow-up
            1
            arrow-down
            1
            ·
            1 day ago

            Branches are distinct.

            Let’s say you have a main and a dev branch, and you periodically merge dev into main. Because of fast forwarding (on by default) the main branch is completely gone from the history. If you then add bug fixes and project branches it becomes a tangled mess really quickly and it’s nearly impossible to understand the structure by looking at the tree.

            On mercurial every branch is named and distinct forever. You don’t have to try to understand what happened to the project since it’s obvious by looking at the tree.

            Now there are ways to have a clean git history, but afaik you either need to make sure nobody ever messes it up or have everyone rebase everything and only keep the history of the main branch.

            When working in a hyper structured organization that may work, but for more casual developers (scientists, students) that aren’t system experts and where you have messy history, mercurial default settings are less confusing, easier to learn and produce better results.