I have a project that I've checked into my SVN repo. Now I've created a second version of the project located in a different folder. I want to check this folder in as well, without interfering with the original project. Looking at my repo, it doesn't look as though I have the typical trunk/branches/tags folders, for whatever reason. So,
- How do I move the original project into a subfolder, like
trunk
? - How 开发者_如何学编程can I create a folder for, and check all the v2 files into a new folder like
branches/v2
- When I want v2 to replace the trunk completely, how can I do that?
SVN has caused me all sorts of nightmares in the past, so I want to make sure I do this correctly.
You have to make the trunk/branches/tags folders yourself.
svn mv original trunk
(where original is your original code folder, you might have multiple files).- Just create this new folder in your original checkout, and move the v2 files into it. Add them using
svn add
. - Read about joining branches in the SVN book (or somewhere else) and join the v2 branch into trunk.
How do I move the original project into a subfolder, like trunk?
- Check out the first repository to my_rep
- Create trunk, branches, tags sub folders in my_rep
- Copy files from my_rep to my_rep/trunk manually
- Delete files in my_rep (using svn delete!)
- Commit changes in my_rep - Now you have trunk
How can I create a folder for, and check all the v2 files into a new folder like branches/v2?
- Checkout the second repository to my_rep2
- Create folder my_rep/branches/v2 and copy manually files from my_rep2 there
- Commit my_rep - Now you have one branch in my_rep
When I want v2 to replace the trunk completely, how can I do that?
You need to merge my_rep/branches/v2 to my_rep/trunk using any diff tool.
精彩评论