A Toy Merging Example

Obtain a better understanding of merging with the help of a visual example.

We'll cover the following

Now, you’re going to run through a typical merging scenario by yourself.

Pre-merge#

Take a look at this diagram:

A branched repository pre-merge

In this diagram, the repository is currently positioned at the tip of master (G). You know this because the HEAD is pointed at G.

Post-merge#

If you merge the experimental branch into master with a git merge experimental command, you end up with a tree that looks like this:

A branched repository post-merge

A new change has been made (I). This change merges together the changes made on experimental with the changes made on master.

Introduction: Merging
Merging Step by Step
Mark as Completed
Report an Issue