In this 1st post of this series, let's talk about the difference between "git merge" and "git rebase". Generally speaking, both "git merge" and "git rebase" can combine the change from one branch into another.
When using "git merge xxx" (xxx is the branch which you would like to combine from), git will merge the diff from "xxx" branch to the local branch. If conflict happens, it has to be fixed manually.
I will use the following graph as example. In this example, we have two branches, master and feature. These two branches both have commit A and B in the history. Then master has commit C & D. Feature has commit E & F.
Therefore, we can see the commit history of master branch has not been changed by the "git merge". Just a new commit is added with the combined changes.