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.