This is my first ever attempt at creating an svn repository and I'm confused.
I have a project in 开发者_开发问答/var/www/project
, and I have a /var/svn/
dir to store the repositories, so I run:
$ svnadmin create /var/svn/project
and I import my tree with
$ svn import /var/www/project file:///var/svn/project/trunk
so far so good -- I think
Now I need a working copy, but I can't checkout in my existing dir or I get
svn: Failed to add file 'some.file': an unversioned file of the same name already exists
am I supposed to delete the entire project tree and then check it out of svn? Also, is this the right way to set up a repository?
you can rename the original project directory if you feel unsure, then check out to a new dir
You can do
svn checkout --force file:///var/svn/project/trunk /var/www/project
This will allow you to checkout into your existing directory that you just imported from.
Yes, after you import a project to a repository, you have to perform a check out:
Note that after the import is finished, the original tree is not converted into a working copy. To start working, you still need to svn checkout a fresh working copy of the tree.
Be sure not to erase your original code to early, though.
Just check out to a new directory. You can always rename it later once you're sure.
精彩评论