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
From the course: Designing and Implementing Source Control using GitHub and Azure DevOps
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
-
-
-
-
-
-
(Locked)
Understanding Git branches1m 45s
-
(Locked)
Creating a Git branch3m 2s
-
(Locked)
Using pull requests2m 4s
-
(Locked)
Merging a pull request in Git2m 26s
-
(Locked)
Understanding Git merge methods2m 36s
-
(Locked)
Performing a merge and rebase4m 51s
-
(Locked)
Handling merge conflicts3m 30s
-
(Locked)
Git branching strategies2m 16s
-
(Locked)
Using the Git flow branching strategy4m 41s
-
(Locked)
-
-