drawing showing git history made in gimp

So I have a bug fix (green) and owner also made a bug fix (red) but I would like to rework both of them due to discussion we had. I have opened a PR and there is merge conflict that can’t be resolved. Should I open a new branch in my fork and close PR or should I google some rebase magic to apply commits to my bug-fix branch.

  • emptyother@programming.dev
    link
    fedilink
    arrow-up
    13
    ·
    10 months ago

    If the merge is really too complicated to easily resolve, drop the PR. Then you can pull in latest and make the fix anew. Don’t delete your old PR’s branch yet, you might want to look up how you did your original fix.

  • nous@programming.dev
    link
    fedilink
    English
    arrow-up
    3
    ·
    10 months ago

    It depends - as with any real answer to a problem. I would likely start with a rebase of you bug-fix on 2.0, resolve any conflicts that might have. If there are multiple commits on bug-fix I might squash them to make the merge easier. But if the conflicts are too complex to really resolve it might be easier and quicker to just redo the work in a new branch if the changes are not that big.

    Which was is better for you depends on how big those merge conflicts are. But it seems like a good opportunity to learn how to rebase and how to resolve merge conflicts.

    • Ludrol@szmer.infoOP
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      10 months ago

      Why?

      merge resolution would produce more work than opening new PR (couple dozen of lines of code)[I want to learn on small mistakes not on big ones] I would like to rework the owners bug fix to have cleaner code.

      Political issue

      So I should make a consensus on „Who should make the work?” and „How should feature be implemented?”.

      Sadly „2.0” is the trunk and „master” is 1.0 release but thanks for the link