Git - Merging

From EdWiki

GitLab - Merging

  • Goals
    Learn how to merge two diverging branches to bring the changes back into a single branch.
  • Merge the branches
    Merging brings the changes in two branches together. Let’s go back to the greet branch and merge master onto greet.
git checkout greet
git merge master
git hist --all

By merging master into your greet branch periodically, you can pick up any changes to master and keep your changes in greet compatible with changes in the mainline.

However, it does produce ugly commit graphs. Later we will look at the option of rebasing rather than merging.

  • Up Next
    But first, what if the changes in master conflict with the changes in greet?