draford
draford

Reputation: 241

How do I link project to an svn repository?

I've set up svn /home/svn/repository/project and created trunk, branch and tags under /tmp/svn-structure-template.

I have a project /home/project. How do I link it to repository, trunk and branch?

Thanks in advance.

Upvotes: 1

Views: 613

Answers (1)

bobah
bobah

Reputation: 18864

Initial setup of a new project is typically done the below way

Variant "a" (remote mkdir)

  1. svnadmin create /path/to/repo
  2. svn mkdir -m 'initial setup' file:///path/to/repo/trunk
  3. svn mkdir -m 'initial setup' file:///path/to/repo/branches
  4. svn mkdir -m 'initial setup' file:///path/to/repo/tags
  5. cd /my/working/area && svn co -depth infinity file:///path/to/repo/trunk
  6. cd trunk
  7. enjoy the result

Variant "b" (local mkdir)

  1. svnadmin create /path/to/repo
  2. cd /my/working/area && svn co -depth infinity file:///path/to/repo
  3. cd repo
  4. svn mkdir trunk tags branches
  5. svn commit -m 'initial setup'
  6. cd trunk
  7. enjoy the result

Once the working copy of the repository is created one can put new files/dirs to the working copy and add it to version control using "svn add" + "svn commit".

Alternatively one may use "svn import" to upload a directory tree directly to the repository under a specified url.

Upvotes: 4

Related Questions