Synchronize a Branch
While working on your own branch, other people on your team might continue to make important changes in the parent branch (which can be the trunk itself or any other branch). It is recommended to periodically duplicate those changes in your branch to make sure your changes are compatible with them. This is done by performing a synchronize merge, which will bring your branch up-to-date with any changes made to its ancestral parent branch since your branch was last created or synchronized. Subversion is aware of the history of your branch and can detect when it split away from the parent branch.
Frequently keeping your branch in sync with the parent branch helps you to prevent unexpected conflicts when the time comes for you to duplicate your changes back into the parent branch. The synchronization uses merge tracking to skip all those revisions that have already been merged, thus a sync merge can be repeated periodically to fetch all the latest changes of the parent branch to keep up-to-date with it.
After running the synchronize merge, your working copy from the child branch now contains new local modifications, and these edits are duplications of all of the changes that have happened on the trunk since you first created your branch. At this point, your private branch is now synchronized with the trunk.
To synchronize your branch with its parent branch, follow these steps:
-
Go to
.The Merge wizard is opened.
- Select the Synchronize branch option.
-
It is recommended that you select the Perform pre-merge best practices
checks of the working copy target option to make sure that the working copy
target item is ready for the merge operation.
-
Click the Next button.
The Synchronize branch wizard page is displayed.
-
In the Parent branch (URL) text box, enter the URL of the branch where you created your branch. This means that
the URL must belong to the same repository as your working copy that was created from the
child branch.
You may also click the Browse button to browse the repository and find the desired branch. If you have previously merged from this branch, then you can simply use the drop-down menu, which displays a history of previously used URLs.Tip: You can also specify a peg revision at the end of the URL (for example,
URL@rev1234
). The peg revision specifies both the peg revision of the URL and the latest revision that will be considered for merging. By default, theHEAD
revision is assumed. -
Optionally, if you want to configure the options for
your merge, click the Next button.
The Merge Options wizard page is displayed that allows you to configure options for the operation.Note: The Ignore ancestry / Disable merge tracking option is not available for this merge type, since a synchronization merge should always be recorded in the destination branch.
-
Click the Merge button.
The merge operation is performed.
If the merge is completed successfully, all the changes corresponding to the selected revisions should be merged in your working copy.