Merging

You can merge branches in your local Git repository and push the results of the merge back to Dimensions CM. Continuing from the previous example, make changes on the master branch and feature2 branch, merge, and push.

  1. Switch to the feature2 branch:
  2. git checkout feature2
  3. Make changes and commit them:
  4. git commit -m “made feature2 changes”
  5. Switch to the master branch:
  6. git checkout master
  7. Make changes and commit them:
  8. git commit -m “made mainline changes”
  9. Merge feature2 into the mainline using Git:
  10. git merge feature2
  11. Resolve any merge conflicts and commit:
  12. git commit –m “merged feature2 into mainline”
  13. Push all the branches back to Dimensions CM:
  14. git push --all origin

The new changes are delivered to both streams and the streams are merged. The streams now look this:

 

 

Note: If you perform a merge in Dimensions CM it is recorded in Git next time you pull or clone a stream.