views:

5395

answers:

3

I'm currently working in a branch I created using the Team-->Branch. How do I use Team-->Merge to merge my changes to the branch back to head?

+3  A: 

Ensure that the destination is loaded into your workspace. This is the most important part and the part I missed when trying to do it a couple of times.

For example, if you wish to merge your changes into HEAD, make sure the project is shared with HEAD in your workspace(not the branch you have been working on). To do this, select the project and choose Team > Replace With > Another Branch or Version from the context menu. Then select the branch to replace with.

From this point, choose Team > Merge and then select the branch you want to merge into HEAD.

Alex Argo
A: 

I struggled with this also and the above answer was not helpful until I checked the "Perform the merge into local workspace" radio button.

Unfortunately, I was not able to preview my merge before the two files were merged.

A: 

I struggled with it all night.. and frankly there is no easy clean way unless you have been anticipating and planning for this merge right from the time you branched. Either that or I am too dumb to understand stuff..!

Anyways I found a hack that works just perfect. http://sites.google.com/site/anshunjain/eclipse-musings/eclipse-hacks/cvs-replace-head-with-branch

Anshu Jain