Yes, I know, probably there's a thought on your mind since we start playing with branches: why he doesn't talk about merging?.
Now the moment has arrived.
In Git, merging two (or more!) branches is the act of making their personal history meet each other. When they meet, two things can happen:
- Files in their tip commit are different, so some conflict will rise
- Files do not conflict
- Commits of the target branch are directly behind commits of the branch we are merging, so a fast-forward will happen
In the first two cases, Git will guide us assembling a new commit, a so-called merge commit; in the fast-forward case instead, no new commit is needed: Git will simply move the target branch label to the tip commit of the branch we are merging.
Let's give it a try.
We can try to merge the melons branch into the master one; to do so, you have to check...