我正在处理一个没有主干/分支/标签目录结构的项目 - 即.一切都在 svn 存储库的根目录中.
I am working a project that does not have a trunk / branches / tags directory structure - ie. everything is in the root of the svn repo.
我想在根目录下创建一个trunk目录,并将根目录下的所有东西都移动到新的trunk目录中.
I would like to create a trunk directory and in the root directory, and move everything in the root directory into the new trunk directory.
最好的方法是什么?
我首先考虑的是
svn mkdir trunk (for each file or directory that is not called trunk: ) svn mv FILEorDIR trunk/但这会有效地删除每个文件,然后再次添加.有没有更好的办法?
But this effectively deletes every file and then adds it again. Is there a better way?
谢谢.
推荐答案这与我过去的做法类似.您的解决方案实际上复制每个文件,然后删除原始文件.由于 Subversion 实现副本的方式,每个文件的历史记录都会被保留.
This is similar to the way I've done it in the past. Your solution actually copies each file, then deletes the original. Because of the way Subversion implements copies, the history for every file is preserved.
执行此操作后,您可以使用 svn switch 将现有结帐点指向新位置.
After doing this, you can point existing checkouts at the new location using svn switch.
更多推荐
SVN 在现有存储库上创建主干目录
发布评论