windows Subversion:如何递归删除所有 .svn 文件?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5282279/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 16:25:30  来源:igfitidea点击:

Subversion: how to remove all .svn files recursively?

windowssvnversion-control

提问by mysql_go

Possible Duplicate:
How do you remove Subversion control for a folder?

可能的重复:
如何删除文件夹的 Subversion 控件?

Is there such a tool?

有这样的工具吗?

I'm being bothered by this issue now again...

现在又被这个问题困扰了。。。

回答by river

find . -name .svn -exec rm -rf {} \;

Just noticed windows tag, so that probably won't help unless you use cygwin.

刚刚注意到 windows 标记,因此除非您使用 cygwin,否则这可能无济于事。

回答by Erik

List them:

列出它们:

find . -type f -name .svn

Delete them

删除它们

find . -type f -name .svn -delete

And if they're actually directories, not files

如果它们实际上是目录,而不是文件

find . -type d -name .svn -exec rm -rf {} \;

回答by Deepukjayan

now here it is. Go to your project root directory and use this terminal command:

现在它来了。转到您的项目根目录并使用此终端命令:

find . -name ".svn" -type d -exec rm -rf {} \;

回答by DuckMaestro

This is built-in to svn using svn export. This can operate in two modes, one which downloads and places a fresh copy of the server content in a new local folder, and the other which takes an existing local folder and creates a new local folder.

这是 svn 内置的,使用svn export. 这可以在两种模式下运行,一种是下载服务器内容的新副本并将其放置在新的本地文件夹中,另一种是获取现有的本地文件夹并创建新的本地文件夹。

Example: svn export c:\MyCheckout c:\MyCheckout2

例子: svn export c:\MyCheckout c:\MyCheckout2

After executing the above, c:\MyCheckout2will contain your checkout but without any .svnfolders.

执行上述操作后,c:\MyCheckout2将包含您的结帐但没有任何.svn文件夹。

You can execute svn help exportto see more instructions.

您可以执行svn help export以查看更多指令。