1

I have been the single developer in a repository for some time. I have a development branch that I do my coding in, and merge changes into trunk for production releases. I now have a graphic designer who is adding cascading style sheets and graphics.

I created a branch for him off my development branch and he did his work in that branch, while I worked in mine. We both made changes and I successfully merged those into trunk. I haven't been able to get his changes to merge back into my branch, and vice versa because I keep seeing "Tree Conflicts".

This leads me to believe that I am not doing the branching and merging correctly. Is there a different pattern that will mitigate these merge issues?

1
  • You need to determine the root of your tree conflicts (pun is not intended). Most probably you add the same files/directories to both branches and then they clash. Is that the case? Commented May 22, 2012 at 15:25

1 Answer 1

2

When merging your branch back to the trunk, are you using the reintegrate option? According to the this set of instructions on merging, the correct process flow would be to reintegrate your branch back into the trunk.

While you did mention that the initial merge was successful, you stated having problems with a subsequent merge to the trunk. The site linked above also recommends deleting your branch after reintegration and creating them anew.

Once a --reintegrate merge is done from branch to trunk, the branch is no longer usable for further work. It's not able to correctly absorb new trunk changes, nor can it be properly reintegrated to trunk again. For this reason, if you want to keep working on your feature branch, we recommend destroying it and then re-creating it from the trunk

See the "Reintegrating a Branch" section of this set of instructions on merging.

2
  • I don't "reintegrate". Subsequent merges into the trunk work just fine as a result. What doesn't work is "parallel" merging.
    – Sonny
    Commented May 22, 2012 at 15:03
  • Sorry, the pre-edited version of the question made it sound like the problem was in merging back to the trunk a second time. Would it be better to create his branch directly off the trunk just like yours rather than branching your branch? You would then need to update your branch whenever his changes are checked-in. It doesn't sound like his changes directly rely on your branch, so I would think his branch should be parallel to yours, rather than a child.
    – Seth
    Commented May 22, 2012 at 15:27

Not the answer you're looking for? Browse other questions tagged or ask your own question.