Merge branches

You can merge branches in your local Git repository and push the results of the merge back to Dimensions CM.

Continuing from the earlier example, Create new streams, make changes on the main branch and feature2 branch, merge, and push:

  1. Switch to the feature2 branch:

    git checkout feature2

  2. Make changes and commit them:

    git commit -m “made feature2 changes”

  3. Switch to the main branch:

    git checkout main

  4. Make changes and commit them:

    git commit -m “made mainline changes”

  5. Merge feature2 into the mainline using Git:

    git merge feature2

  6. Resolve any merge conflicts and commit:

    git commit –m “merged feature2 into mainline”

  7. Push all the branches back to Dimensions CM:

    git push --all origin

The new changes are delivered to both streams and the streams are merged.

The streams now look like this:

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

Back to top