In the previous exercise, you learned how to create and work with different branches.
The main concept behind branches is to merge the modifications made in one branch into the main branches once you tested your changes.
The profile
branch is ready to be merged with the master
branch.
To do so, you need to set yourself on the branch master (with checkout
) and use the command git merge
.
The merging of two branches works similarly to a pull
from the remote history.
If there are no modifications on the master branch (as here), the pointer of the branch is just moved.
If there are compatible modifications on the master branch, a merge commit is automatically created.
If there are incompatible changes, the conflicts will have to be solved just as in the exercise on conflicts solving.
Then, as usual, you need to push the local history of the branch master
to the remote history.
You have to use git merge <src-branch-name>
on the destination branch.