tags:

views:

39

answers:

2

So I have a ruby on rails application that I have created on my local computer. I have a remote repository that I've created. Now how do I check it in for the first time? I have never created my own svn project before, so I don't know how to do it. I've only made commits to projects that I've worked on.

Solution:

cd [my project dir]
svn import -m "First Check-in" svn://[SubversionRunningMachine]/[ProjectName]/trunk

This will check in the project. Now you have to check out the project.

svn co svn://[SubversionRunningMachine]/[ProjectName]/trunk NewProjectName
+1  A: 

Just something I noted down way back on my blog. Hope it helps...

http://madcoderspeak.blogspot.com/2007/12/my-lil-subversion-jumpstart-tutorial.html

Although I'd recommend getting a helper client like TortoiseSVN to help you be more productive (unless your intent is to master the svn command line interface). Refer to the list of third party clients here

Gishu
+2  A: 

You have to create the repository on the server first, then use the svn import command:

svn import <<URL>> -m<<comment>>

This will add all of your files to the repository and then commit them in one step.

Alternatively, you can check out the empty repository (you should have at least /trunk, /tags, and /branches, check out /trunk) and then copy all of your files into the new working copy and add only the files/directories you want to commit. I prefer this method.

Ken Liu