Force an SVN checkout command to overwrite current files

后端 未结 5 801
伪装坚强ぢ
伪装坚强ぢ 2020-12-12 22:17

I\'m adding an existing site to SVN.

The files already exist on the webserver, and now identical copies (- configuration files) exist in the repository.

I wa

5条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-12 23:10

    This can be done pretty easily. All I did was move the existing directory, not under version control, to a temporary directory. Then I checked out the SVN version to my correct directory name, copied the files from the temporary directory into the SVN directory, and reverted the files in the SVN directory. If that does not make sense there is an example below:

    /usr/local/www
    
    mv www temp_www
    svn co http://www.yourrepo.com/therepo www
    cp -pR ./temp_www/* ./www
    svn revert -R ./www/*
    svn update
    

    I hope this helps and am not sure why just a simple SVN update did not change the files back?

提交回复
热议问题