How to correctly merge 2 branches

11,859

First of all, the merge must be done on the working copy of the prototype branch.

A merge consists in applying a diff between two versions of some branch to another branch. The From and the To must thus both point to the trunk. You want to apply, on the prototype branch, the changes made on trunk, from revision X to revision Y.

This is very well explained in the SVN book.

Share:
11,859
Gundon
Author by

Gundon

Updated on June 04, 2022

Comments

  • Gundon
    Gundon almost 2 years

    I have a master-branch called trunk and a branch of it called prototype has been created.

    Since the branch happened, commits have been done in both trunk and prototype (sometimes even the same files).

    What's the best way to update the prototype so that it contains all new commits from the trunk without losing the prototype-commits?

    I just tried to rightclick on my projectfolder -> Team -> Merge, selected the trunk as From: and my prototype as To:. I also checked both Merge from HEAD revision.

    But after this some new files of prototype were missing.

  • Philipp Wendler
    Philipp Wendler over 12 years
    +1 for the reference to the SVN book. It is very well written and contains a detailed explanation of merging etc.