Comment by nuancebydefault

Comment by nuancebydefault 2 days ago

2 replies

The thing is if you merge immediately into master and have conflicts, you solve the conflict and only then you can merge. But then the conflict resolution sits at the merge point with a weird default commit message and is hard to decipher.

A nicer way is merge master into your branch, with the rebase option (you can set that option as the default). This will put your changes on top of the master changes that happened during populating your own branch. There you solve any conflicts and those usually immediately show you what happened in the meantime, making it easier to do so. The latest greatest now sits in your branch.

Then as a plus, you can retest that merge and if necessary, fix the merge.

Optionally you can do a pull request for reviewing. The diff the reviewers see is conflict-less and makes sense, has only your changes.

Then simply merge to master, which should be trivial if you don't wait for long.

Nullabillity a day ago

Merge main into your branch, then merge --no-ff your branch into main. No need to rebase or squash anything.

  • Izkata a day ago

    > Merge main into your branch

    The same problem GP was trying to avoid is created here, the merge conflict resolution being on the merge commit.