From the course: Git from Scratch

Unlock the full course today

Join today to access over 24,200 courses taught by industry experts.

CONFLICT: How to fix merge conflicts

CONFLICT: How to fix merge conflicts - Git Tutorial

From the course: Git from Scratch

CONFLICT: How to fix merge conflicts

- [Instructor] Merging branches where there have been no code changes in the same location in both branches is a clean process. It's also a rare process. In most cases, there will be some form of conflict between branches, the same code or the same code area has been changed in different ways in the different branches. Merging two branches where there are conflicts like this will not work, at least not automatically. You see, Git may be an omnipotent passive observer of all things when it comes to what code is in your files but it has no idea how you want that code to be merged together. So when there's a conflict like this, it flags it as a conflict, and the merge operation stops. This sounds way more dramatic than it really is. When you get a conflict warning, Git is telling you hey, there're two different versions of history here and I need to know which is the one you want to keep. To help you figure out the…

Contents