Skip to content

Git merge

Matillion Designer uses branches to allow multiple users to work separately and simultaneously within the same project.

After working on a branch, you can use Merge to integrate changes from one branch into another. This action combines the changes from two branches and creates a new unified version of the code. Read Git Overview for more details of how Designer manages the work of multiple users with Git features.

Merge changes into another branch

Property Description
Branch (ours) This is your current branch—also known as the source branch. You cannot edit this field. You must switch branches to merge from a different branch.
Branch to merge into (theirs) A drop-down list that displays all branches in your project. This is the branch you want to merge your changes into, also known as the target branch. The latest commit on the selected target branch is also displayed.
Merge commit message A text field that is autopopulated by a default merge commit message, which is editable.
Publish pipelines A toggle to enable publishing of pipelines. Publishing makes pipelines available for scheduling. Any existing schedules will run the updated published pipeline. This feature is currently only available to merge to the main branch.
Select environment to publish to If Publish pipeline is toggled on, select the environment that the scheduled pipelines will use. Read Add environment to learn more about environments.

How to merge two branches


It is good Git practice to ensure your branch is up-to-date with the latest changes before making any changes to your branch, committing, and merging. To do this, use the Pull remote changes action.

To merge the work you have done on one branch to a different branch:

  1. Commit the changes you have made while you are on your current branch.
  2. Click Merge from the Git drop-down menu.
  3. The Merge changes into another branch dialog shows the current branch you are merging from ("ours") and the branch you are merging into ("theirs").
  4. Select the branch you want to merge your current branch into. The Branch to merge into drop-down will display every branch in the current project.
  5. Enter a Merge commit message. You can leave the default message, or replace it with one that has more detail about your changes, but you can't leave the field blank.
  6. If the pipelines you are merging need to be added to schedules, click Publish pipelines. This can only be done when merging into the main branch.
  7. If there are no merge conflicts detected, click Merge. Otherwise, see How to resolve merge conflicts, below.
  8. To view the merged changes, switch to the other branch and Pull remote changes.

How to resolve merge conflicts

A merge conflict occurs when you try to perform a merge of two branches that each contain changes to pipelines of the same name.

Since a branch can't have two pipelines of the same name, when you merge the branches, only one of the pipelines can be kept. The Merge changes into another branch dialog will warn you when there is a merge conflict, and require you to resolve the conflict before proceeding.

The Merge changes into another branch dialog will list every pipeline that exists in both branches that contain conflicts. For each listed pipeline, choose which version you want to keep: "ours" (the one in your current branch) or "theirs" (the one in the branch you are merging into). Once you have selected the versions to keep for each conflicted pipeline, you can proceed with the merge.