5.3 Merging Changes Between Branches
These branches are great for organizing your repository, but you need to be able to share changes between branches. This is done through merging.
Merging does exactly what it sounds like. It takes two—or sometimes more—branches and merges them into one. There are a couple of different ways to merge changes between branches. This section covers the following:
-
Straight merges take the history of one branch and the history of the other branch and attempt to merge them together.
-
Squashed commits take the history of one branch and compress—or “squash”—it into one commit on top of another branch.
-
Cherry-picking a commit pulls a single commit from a different branch and applies it to the current branch. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access