Chapter 7. Merging Changes Together
The previous chapter, Advanced Branching Techniques, described how to use branches effectively for collaboration and development.
This chapter will teach you how to integrate changes from different parallel lines of development (that is, branches) together by creating a merge commit, or by reapplying changes with the rebase operation. Here, the concepts of merge and rebase are explained, including the differences between them and how they both can be used. This chapter will also explain the different types of merge conflicts, and teach how to examine them, and how to resolve them.
In this chapter, we will cover the following topics:
- Merging, merge strategies, and merge drivers
- Cherry-picking and reverting a commit
- Applying a patch and a patch series
- Rebasing a branch and replaying its commits
- Merge algorithm on file and contents level
- Three stages in the index
- Merge conflicts, how to examine them, and how to resolve them
- Reusing recorded [conflict] resolutions...