How to start an SVN project from the command line?

后端 未结 3 886
悲哀的现实
悲哀的现实 2021-01-30 09:04

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 hav

相关标签:
3条回答
  • 2021-01-30 09:26

    There are actually two ways to do this. One is through the use of import which doesn't put your active code base under version control. The other method is to just create an empty project in the repository and then check it out directly into the code base. Then just do an add and an a commit:

    svn mkdir <repo>/newProject
    svn checkout <repo>/newProject /path/to/codebase
    svn add /path/to/codebase/*
    svn commit /path/to/codebase -m "adding initial codebase"
    

    There is a good tutorial on how to create a new project here: http://web.archive.org/web/20110316170621/http://www.duchnik.com/tutorials/vc/svn-command-reference

    0 讨论(0)
  • 2021-01-30 09:30

    See below screnshot ...

    First you need to create a directory(pathToProject in this case) and then you just need to apply svn checkout command! After that to check if its really working or not, just modify any of the file and commit it to check if your changes are successfully applied or not.

    $ svn update
    $ svn commit
    
    0 讨论(0)
  • 2021-01-30 09:42

    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.

    0 讨论(0)
提交回复
热议问题