You are here: Merging Files Between Branches > Rebasing branches

Rebasing branches

Rebasing detects and merges changes from the parent branch down to the child branch. This ensures the child branch includes the most current files. For example, Cathy and Jon work on bug fixes in their workspace branches. Jon completes his work and promotes changes to the parent branch. Cathy needs his changes to fix a bug. She rebases from the parent branch to merge Jon’s changes into her workspace branch.

Rebasing only applies new changes to branches. It does not copy file contents from branch to branch. An internal flag tracks the file version that was last rebased from. If a version in the parent branch is flagged because it was already rebased to the child branch, the file cannot be rebased until the version changes in the branch it was rebased from. It does not matter if the file contents are different. See No Files to Rebase in Surround SCM for information.

Note: Custom field values and workflow states set on files in the child branch do not change when rebasing. Files added to the child branch when rebasing are set to the default custom field value and workflow state defined on the Surround SCM Server.

1. Select the branch you want to rebase changes to and choose Branch > Rebase Branch.

The Rebase Branch dialog box opens.

2. Enter any Comments, such as the reason for rebasing the branch.

3. Select a Rebase branch based on option.

Note: Labels on files in the parent branch are not copied to the child branch.

4. Select Skip server auto-merge to rebase all files and overwrite any changes in the current branch.

5. Click Preview.

The Rebase Preview dialog box opens. Files that will be rebased, files that will not be rebased, and files with conflicts are displayed. You can resolve conflicts based on the file status and your security permissions. See Rebase preview.

6. Select a file and click Rebase File to rebase it or click Rebase All to rebase all files.

The Rebase Status dialog box opens. You can perform many of the same actions available in the Rebase Preview dialog box.

 

Additional documentation  Knowledgebase  |  Blog  |  Technical support