How do you remove Subversion control for a folder?

2019-01-03 11:30发布

I have a folder, c:\websites\test, and it contains folders and files that were checked out from a repository that no longer exists. How do I get Subversion to stop tracking that folder and any of the subfolders and files?

I know I could simply delete the .svn folder, but there are a lot of sub-folders in many layers.

标签: svn
27条回答
Fickle 薄情
2楼-- · 2019-01-03 12:24

My idea is to remove the .svn folder and then move all other files to a new folder. It is as simple as that.

查看更多
再贱就再见
3楼-- · 2019-01-03 12:24

As a vital point, when you use the shell to delete .svn folders, you need the -depth argument to prevent the find command entering the directory that was just deleted and showing error messages like e.g.

"find: ./.svn: No such file or directory"

As a result, you can use the find command like below:

cd [dir_to_delete_svn_folders]
find . -depth -name .svn -exec rm -fr {} \;
查看更多
Root(大扎)
4楼-- · 2019-01-03 12:26

Use the svn export command:

cd c:\websites\test
svn export c:\websites\test_copy

All files under version control will be exported. Double check to make sure you haven't missed anything.

查看更多
登录 后发表回答