20

I've been doing some minor fixes on the trunk, but I am wishing I would have branched out for what I'm doing now. What's the easiest way to do this in Tortoise SVN now?

I'm thinking that this is what the "Working Copy" option is for when branching, but I see the following explanation:

Working copy - The new branch is an identical copy of your local working copy. If you have updated some files to an older revision in your WC, or if you have made local changes, that is exactly what goes into the copy. Naturally this sort of complex tag may involve transferring data from your WC back to the repository if it does not exist there already.

and it makes me wonder if the part in bold is referring to updating the trunk or the new branch you're about to create. I would think the latter but just wanted to check before I do it. Or if there's another way I should do this please let me know. Thanks!

Brandon Moore
  • 8,590
  • 15
  • 65
  • 120

2 Answers2

20

Yes, Working Copy is exactly the option you want. The transferring of data it is referring to is for the new branch, not the trunk (i.e. you may have added new files locally that don't yet exist in the repository - they will be added to the branch).

Marty
  • 7,464
  • 1
  • 31
  • 52
6

It will indeed make the local changes to the branch, and not to the trunk. The manual says:

Even if you create the branch from your WC, those changes are committed to the new branch, not to the trunk, so your WC may still be marked as modified with respect to the trunk.

You could also just copy the revision from which you started the changes to a new branch, and then switch your WC to that branch. That avoids committing unstable modifications, even to the new branch.

JB Nizet
  • 678,734
  • 91
  • 1,224
  • 1,255
  • Cool... and thanks for pointing out the alternative options. In this instance though it looks like the Working Copy option is the way to go since I want to check it in so I can access it from home. – Brandon Moore Nov 18 '11 at 23:36