how to import a new project into an svn repository
i always forget the syntax for importing a new directory into svn because i don’t do this frequently. i’ll outline the steps and command lines here, which mostly apply to unix systems.
-
create the directory which you’ll import. e.g., for an addressbook app. make sure you include a trunk/ subdirectory.
mkdir -p addressbook/trunk
if you have any code, copy it into
addressbook/trunk/. -
now import that into your repository (which in this case is hosted on a machine named
build). thusly for the addressbook app:svn import addressbook svn://build/addressbook
this will slurp everything in the
addressbook/directory into svn. -
let’s check out the addressbook app from svn to make sure it all imported successfully.
svn co svn://build/addressbook/trunk
when it’s done, you should have a
trunk/directory around. inspect the contents oftrunk/to ensure it contains everything you expect. it should. -
at this point, you can remove all the original stuff and begin using your svn’d stuff.
rm -rf addressbook
mv trunk/ addressbook/
.
for more information, please check the more authoritative resources are svn help import and the svn manual.
About this entry
You’re currently reading “how to import a new project into an svn repository,” an entry on e-huned.com
- Published:
- 03.03.07 / 10am
- Category:
- Uncategorized
No comments
Jump to comment form | comments rss [?] | trackback uri [?]