I'm in a stupid situation: I have done some changes in a working copy of the TRUNK. Since the changes have not been tested, I'd like to transfer all the changes to a branch. According to the manual of Tortoise, Switch will lose all my modifications. Is there any way to keep my changes in the working copy and save them in a branch in the repository.
To create a branch or a tag in a Subversion repository, do the following: From the main menu, choose VCS | Subversion | Branch or Tag. Alternatively, select the source folder in the SVN Repositories tool window and choose the Branch or Tag command from the context menu.
In order to do that, you only need to follow three steps: Create a new branch in which you will commit your changes. Switch your current working copy to this new branch. Commit your changes to the new branch.
The trunk is the main line of development in a SVN repository. A branch is a side-line of development created to make larger, experimental or disrupting work without annoying users of the trunk version.
Creating a branch is simple. All you need to do is make a copy of your project using "svn copy". This command will require the URL of your project's /trunk directory as well as the URL of the directory where you want to create your branch.
Create a branch from your working copy instead of the repository. That way you wont lose anyting
If I understand the problem correctly, you are working on a copy that you checked out off TRUNK
, but you haven't committed the changes yet.
In that case, it's easy to solve this problem:
TRUNK
: svn cp <base URL> <new branch URL>
<new branch URL>
above)<new branch URL>
Since you haven't committed anything to TRUNK
, the TRUNK
version of the project is left unmodified
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With