DEV Community

Discussion on: [Git] How do I merge featured branch into master, when master have already be edited (e.g. bug fixes)

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt • Edited

I would fear, that merging at different stages in history would cause conflict, that I have to manually fix.

Is it better to see this?

If you have questions, please
<<<<<<< HEAD
open an issue
=======
ask your question in IRC.
>>>>>>> branch-a

Or, fix bugs in "feature" branch when it actually appears?

Collapse
 
otomer profile image
Tomer Ovadia • Edited

Well, fixing bugs and resolving conflicts is two different things.

  1. A merge conflict is an event that occurs when Git is unable to automatically resolve differences in code between two commits. Resolving conflicts is integral part of merging, you are expected to resolve conflicts when it happens.

  2. A bug is an error, flaw or fault in your software that causes it to produce an incorrect or unexpected result, or to behave in unintended ways. No one wants to fix bugs he doesn't own, but, you can merge any time from master, meaning, you can assume that some point on master was stable, and I would count on that and merge that point of time into your branch. (could be after the bug was fixed or before the bug existed)

Does it make sense?