this post was submitted on 09 Sep 2023
11 points (100.0% liked)

No Stupid Questions (Developer Edition)

934 readers
1 users here now

This is a place where you can ask any programming / topic related to the instance questions you want!

For a more general version of this concept check out [email protected]

Icon base by Lorc under CC BY 3.0 with modifications to add a gradient

founded 1 year ago
MODERATORS
 

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.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 8 points 1 year ago (2 children)

Merge conflicts can always be resolved, just not automatically. You should learn how to resolve them.

[–] [email protected] 2 points 1 year ago (1 children)

The red commit made changes to files that after the merge would produce dead code.

[–] [email protected] 4 points 1 year ago* (last edited 1 year ago)

Part of doing a merge commit at all is ensuring the merge results in clean code. You would need to resolve this in your merge commit, even if that area of the code was not in a merge conflict. You learn this when learning to resolve merge conflicts.

[–] [email protected] 2 points 1 year ago

Yep, most merge conflicts that happen on less than 10 lines can be fixed manually. It's an invaluable skill.