问题
I have a project in the 'trunk' folder. When I needed to create a branch, I copied the contents of the 'trunk' folder into a new 'branch' folder. As a result, the directory structure looks like this.

Now I want to merge the contents of the branch and the trunk into the trunk folder. How can I achieve that?
I tried by selecting 'Merge two different trees' from the Merge menu of tortoise SVN.
I entered the trunk URL in the FROM field and the branch URL in the TO field.
However, it gives the error 'Tree Conflict' for every folder because the names of the folders in 'Trunk' and 'Branch1' are the same. I want the contents of these folders to merge.
回答1:
I copied the contents
You should use create branche function (branch/tag in windows context menue when using tortoiseSVN), so the branch and trunk will know there relationship. This is imported to avoid tree conflicts
I tried by selecting 'Merge two different trees'.
Better use 'Reintegrate a branch' (best for your purpose) or 'Merge a range of revision'.
回答2:
Checkout your trunk and your branch in different directories and perform your merge with WinMerge.
Then consider removing your branch and recreating it again properly.
回答3:
If Branch1
is modified tree of Trunk
and you want merge changes from branch to trunk, you have to:
- Read SVN book, where process of merge is clearly written
- Use this knowledge
- Checkout thunk into clean, unmodified Working Copy
- in this Working Copy select in TSVN context menu "Merge" - Merge Branch (1.7 version, from memory, I have now 1.8 TortoiseSVN)
- Enter full or relative URL to branch
- Merge (or perform test-merge before real merge)

来源:https://stackoverflow.com/questions/17211072/how-do-i-resolve-the-tree-conflict-when-merging-branch-with-trunk-in-svn