Reintegrating a Branch

A reintegration merge, also known as a back merge is appropriate when the changes made in a branch need to be integrated back into the branch’s ancestor.

For example, following the completion of a feature in a branch, the changes will need to be folded back into the project’s trunk for integration with the rest of the project.

An up-to-date and fully-synchronized branch is a prerequisite for reintegration.

Before reintegrating, synchronize the branch with its ancestor and verify that the changes implemented in the branch integrate as expected with all changes made to the ancestor subsequent to the original creation of the branch.

Once reintegrated, a branch can no longer accept changes. Instead, a new branch can be created should additional changes be required.

To reintegrate a branch’s changes:

  1. Click the Reintegrate Branch button:

    Reintegrate Branch

  2. Verify that the selected working copy does not contain any uncommitted modifications.

    Merging into a working copy which contains uncommitted modifications can result in unnecessary conflicts and is not recommended.

    Cornerstone will display a warning in the Working Copy Checklist if modifications are detected. If necessary, click the Revert... or Commit... button as required.

  3. Verify that the selected working copy is up-to-date.

    A working copy must be up-to-date and correspond to a single revision before it can be used to reintegrate changes.

    Attempting to merge into an out-of-date or mixed-revision working copy will result in an error.

    If necessary, click the Update to Latest Revision button to bring the working copy up to date.

  4. Specify the branch to merge from in the Merge from field.

  5. If required, change the merge options by clicking on the Options popup button.

  6. Cornerstone will display a preview of the changes to be merged.

  7. Click the Merge Changes button to merge the changes into the working copy.

  8. Changes made in the branch are merged into the selected working copy.

  9. Verify the changes and resolve any conflicts.

  10. Commit the changes to the repository to complete the merge operation.