20

Got my first merge conflict today 🎉 (haven't worked much with git)

So yay.. I guess 🤔

Comments
  • 1
    Push your current branch before you try to mess with rebasing, maybe rebase onto a new branch.

    So many stories (including me) of people messing up their branch/losing work.
  • 3
    @atheist no, do not push a conflict to develop, either resolve it directly or if you want to be careful, create a new clone locally and rebase that, then merge.
  • 2
    Don't worry, it won't be your last.
  • 1
    Here's to many more 🍻
  • 1
    @Voxera yes I meant push your working branch to a remote. "Local clone" is a remote.
  • 1
    Nice. now: Solve the conflict, and make sure you did not break anything before you open the MR.
  • 2
    I've been at this for a while and they still get me sometimes. I lost a few hours work the other day
  • 3
    Merge conflicts are straightforward

    You just choose whose code goes where after doing some thinking and discussing with the people involved in the conflict

    But conflicts on a lot of files are a headache
  • 5
    @asgs conflicts are also a headache when you gotta read someone else's code and it's crap
  • 0
    Ohh git.

    So good on paper. So bad in a daily usage...
  • 2
    @NoToJavaScript still better than the alternatives I have used before.

    Most of the problems come from bad code or bad organization and not really from git ;)
  • 1
    I guess, you just cancelled, rebased, and then merged and pushed without even needing to edit anything.
    It is GIT after all - not Subversion...
  • 1
    @NoToJavaScript I fully disagree with you. Works fine in daily usage.
    Conflicts are things that cannot be resolved without analysing two sets of changes. Solving that should be out of the scope of git, perhaps something for autopilot kind of solution.
Add Comment