From the course: Designing and Implementing Source Control using GitHub and Azure DevOps

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Handling merge conflicts

Handling merge conflicts

- [Instructor] Let us simulate a common merge scenario, where two branches with separate commit histories must be merged and have conflicting code. This can be possible if you're working on a feature branch, but the main branch has changed at least once since you made your branch. In this case, you will need to update your main branch with changes from the feature branch, solve possible commit conflicts, and then complete your merge. Let us start off by creating a new feature branch from main, using our branch button to the bottom left-hand corner. Let us call this branch feature-1. At this point, both branches have identical code, and in feature-1, let us modify the index file on line 16 with a little message, and I will just qualify it so we know that it's coming from the feature-1 branch. Now we have a change, let us commit this change. Now let us switch back to our main branch, and let us simulate further development.…

Contents