We realized that we would like some work in the trunk to have actually have been in a branch. We would like several commits to go into a branch, and preferably, we would preserve the history of the commits. So:
r0 --- r1 --- r2 --- r3
would become
branch --- r2 --- r3
/
r0 --- r1 ----- *
Where “*” is where we will start making new commits to the trunk. I’m nervous that I’ll destroy our repository if I do something incorrectly. Please advise, thank you!
Basically the current status of trunk is good for the branch, so you should just do a server-side
svn copyfromtrunkto the desiredbranchessubdirectory:Then you would need to revert trunk to r1, which is easily achieved by either applying a reverse patch from r1 to r3 or by actually using svn merge:
EDIT: Actually, there’s a better solution here: How do I properly branch post-commit and revert the trunk in svn?