SVN Command Line Question
Hi I'm new to svn and am trying to get the hang of the raw command line before I progress to UI wrappers like subclipse, etc (that's just how I like to work).
I have a repo set up at /opt/svnrepo/myProject. The myproject/ d开发者_运维技巧irectory has the 3 typical folders (trunk, branches, tags). I've checkout out those folders (all empty) to my working directory, let's say at /home/myName/workspace/myProject.
Probably somewhat backwards, I've now set up a project directory tree under another folder, /home/myName/myProject, which includes:
/home/myName/myProject/dev/src/ /home/myName/myProject/dev/test/ /home/myName/myProject/dev/build/ /home/myName/myProject/dev/ant/ /home/myName/myProject/biz/ /home/myName/myProject/docs/ /home/myName/myProject/assets/ ... etc.
I want to now add the /myProject's /dev, /biz, /docs and /assets folders to my repository and check them out to my working directory at /home/myName/workspace/myProject. Once I have done this, I think I understand svn well enough to use it correctly from here on out, using svn to make, move around and rename directories, etc. I'm just choking on this first part for some reason.
So, using the folders I've name above, what command line options do I need to give svn to accomplish: (1) checking the new directory tree into my repo, and (2) checking it out to my working directory?
Thanks!
Try
svn import -m "Imported project directory structure" dev svn://path/to/my/repo/trunk/
then to update your working directory
cd /home/myName/workspace/myProject
svn update
You might also want to give Version Control with Subversion a read
Use svn import
to copy a tree of files into the repository, e.g.
svn import /path/to/mytree \
file:///opt/svnrepo/myProject \
-m "Initial import"
Then navigate to your working copy and run svn up
.
Use svn import
. For example:
svn import -m "Importing myProj" dev svn://path/to/my/repo/trunk/
精彩评论