• GissaMittJobb@lemmy.ml
    link
    fedilink
    arrow-up
    3
    ·
    6 months ago

    Taking the time to learn how git works on a conceptual level and then how to resolve merge conflicts effectively is a worthwhile investment. Highly recommended

    • Kache@lemm.ee
      link
      fedilink
      arrow-up
      0
      ·
      6 months ago

      Even better, learn how to avoid conflicts from happening in the first place!

        • pixelscript@lemmy.ml
          link
          fedilink
          English
          arrow-up
          1
          ·
          6 months ago

          You don’t. One of the core aspects of Git is that it fully expects conflicts to be inevitable, and it gives you tools to resolve them.

          I will say that if you learn to aggressively rebase branches, you can at least occasionally reduce the complexity of conflicts.

          If you are working on a long branch and three other branches that conflict with your changes land in the meantime, a simple merge will force you to reconcile all of those conflicts in one big stinky merge commit.

          If you instead rebase after each individual branch lands, you resolve the same number of conflicts but in three smaller, focused steps instead of one big ugly one. You also don’t get a merge commit full of redundant deltas that serve only to resync your branch to master; all the conflict resolution becomes baked in to your individual branch commits.

          Spreading out the problem is not reducing the problem. But it can make fixing the problem less daunting, which has a similar effect.

  • Gork@lemm.ee
    link
    fedilink
    arrow-up
    3
    ·
    6 months ago

    “Cave Johnson here. We are implementing a new policy, effective immediately. The git blame command will now be used to blame individual programmers. The blamed party will temporarily be reassigned to our home appliances division to test our new line of giant washing machines by riding the spin cycle. Don’t worry, it’s perfectly safe, but we are not liable for personal injury or death.”

  • pcouy@lemmy.pierre-couy.fr
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    6 months ago

    Might as well use Google drive… Or maybe actually learn to use git? The learning curve is steep but it’s worth investing in it