Brob
Brob

Reputation: 675

Creating SVN trunk within current repository

We've been working with a repository which has been been located in the folder root and everything has been fine. However since moving the site live we need to branch some of the work but are unable to do so due to the lack of a trunk.

My question is, how do I create a trunk within the current directory structure and move all current content into it?

Upvotes: 4

Views: 7516

Answers (2)

Matthieu Napoli
Matthieu Napoli

Reputation: 49583

  1. Create a trunk and a branch folder in your root
  2. Move (using SVN) the content of the root in trunk
  3. There is no step 3

Don't forget to commit those modifications... You can then branch your trunk.

Additional note : If your folder contains a lot of files, then you will be better of moving the files on the repository, note your computer. This will be way faster! You will have to update after that though.

Upvotes: 6

Jay
Jay

Reputation: 27482

It's very straightforward. You pretty much do just what you said you want to do. Check out the project. Create a new directory and call it "trunk". Move all the files into this new directory. Then commit it.

If you're using Eclipse, it "knows" that you've created new directories and moved files and sends the correct messages to SVN.

If you use Tortoise, you can do it all within a Repo-browser session.

If you're using command-line SVN, you need to create the directory using the "svn mkdir" and move the files using "svn move". Don't try to do the creates and the moves with OS commands -- SVN won't know that you've done it.

Upvotes: 0

Related Questions