SVN in-place import and checkout

后端 未结 2 1720
悲哀的现实
悲哀的现实 2021-01-31 09:19

Using the Linux command line and Subversion, is it possible to take a directory and add version control to it?

Basically, I want to import the directory into a newly cre

2条回答
  •  南笙
    南笙 (楼主)
    2021-01-31 09:48

    Let's say you've used svnadmin to create a repository at /svn/foo/mydirname, and you want to version control /home/user/mydirname (is that what you mean?).

    Then do the following:

    cd /home/user/mydirname
    svn co file:///svn/foo/mydirname . #This only creates the ".svn" folder for version control
    svn add ./*                        #Tell svn you want to version control all files in this dir
    svn ci                             #Check the files in
    

    Your directory is now version controlled!

提交回复
热议问题