“Phantom” directories in an SVN repository

后端 未结 7 2590
没有蜡笔的小新
没有蜡笔的小新 2021-02-18 18:13

I\'ve somehow managed to get an SVN repository into a bad state. I\'ve moved a directory and now I can\'t commit it in its new location.

As far as svn status

7条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-18 18:47

    What happened is that you made a checkout of a folder, then locally 'svn add'ed and/or modified something to/in this folder, but before you have committed your changes, the original folder was moved (or deleted) from the SVN repository.

    All you need to do is to switch your current checkout to the new location in the SVN repository. So, supposing you have a checkout of the foo folder from path/to/folder1/foo, and that foo was moved to path/to/foo, you just need to run:

    $ svn switch path/to/foo
    

    That's it... ;-)

提交回复
热议问题