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.

Understanding Git merge methods

Understanding Git merge methods

- [Instructor] We have just seen that merging changes is essential to working collaboratively on a project. It is the last step that gets executed after a pull request. There are different types of merge methods available in Git and it is crucial to understand when to use them. Each method has its advantages and disadvantages. And the choice of method depends on the specific situation. Let us start by looking at the recursive merge. This method is used when the merging branch has commits that are not yet in the target branch. It tries to merge the changes in a way that combines them in the best possible way. This method creates a new merge commit with two parent commits, one from each branch, and it preserves the history of both branches. And this method can be used in most cases. Next is the fast-forward merge. This method is used when the branch being merged and the target branch have no deviations in their commit histories.…

Contents