从 Eclipse 中现有的 Java 项目中删除 SVN

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11414074/
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-19 18:31:16  来源:igfitidea点击:

Remove SVN from an existing Java project in Eclipse

eclipsesvn

提问by Paolo

I have a versioned Java project in Eclipse.

我在 Eclipse 中有一个版本化的 Java 项目。

I decided to remove "SVN" so that when I right-click > Teamon the project, I can only obtain the following choices : Share project ...and Create patch ...instead of commit ..., Update, etc.

我决定删除“SVN”,所以,当我right-click > Team的项目,我只能得到以下选择:Share project ...Create patch ...代替commit ...Update等等。

What is the best (cleanest) method to remove version control from a project in Eclipse ?

从 Eclipse 中的项目中删除版本控制的最佳(最干净)方法是什么?

回答by ntalbs

If your project is properly version controlled with SVN, you should be able to see "Synchronize with Repository", "Commit", "Update" under the "Team" menu item of the context menu. In this case, you can use Team > Disconnect.

如果您的项目使用 SVN 进行了正确的版本控制,您应该能够在上下文菜单的“团队”菜单项下看到“与存储库同步”、“提交”、“更新”。在这种情况下,您可以使用Team > Disconnect.

If you can't see the menu items like these under Team menu, check that there is .svn(hidden) directory in your project root.

如果在 Team 菜单下看不到这些菜单项,请检查.svn项目根目录中是否有(隐藏)目录。

Perhaps you can check out the project again from the repository and use Team > Disconnectif you haven't changed the code a lot.

也许您可以从存储库中再次检出该项目并使用,Team > Disconnect如果您没有对代码进行大量更改。

回答by Mihai

Try to recursively delete all .svn folders from your project's root folder. For example, on a Linux machine, you should issue the following command in the project's root folder:

尝试从项目的根文件夹中递归删除所有 .svn 文件夹。例如,在 Linux 机器上,您应该在项目的根文件夹中发出以下命令:

rm -rf `find . -type d -name .svn`

rm -rf`查找。-type d -name .svn`

回答by edmiikk

You only have to remove the top level .svn folder. Then share the project and Eclipse is smart enough to delete all the recursive .svn folders.

您只需删除顶级 .svn 文件夹。然后共享项目,Eclipse 足够智能,可以删除所有递归 .svn 文件夹。

回答by Steve Ham

You can remove the .svn folders in your project by:

您可以通过以下方式删除项目中的 .svn 文件夹:

  1. Open Terminal
  2. cd "Your project path"
  3. find . -type d -name .svn -depth -exec rm -rf {} \;
  1. 打开终端
  2. cd“你的项目路径”
  3. 找 。-type d -name .svn -depth -exec rm -rf {} \;

回答by soneya

An easy solution :

一个简单的解决方案:

Find the .svnfolder in your project directory. It is a hidden folder so find it from File-> show hidden folder. Then delete it .

.svn在您的项目目录中找到该文件夹。它是一个隐藏文件夹,因此请从File-> show hidden folder. 然后删除它。

回答by dosakiller

One good approach to export the SVN project from the repository instead of a checkout which will not have the .svn folders, the local workspace can then be used for updating into a different branch or repository with a similar folder structure.

从存储库导出 SVN 项目而不是没有 .svn 文件夹的检出的一种好方法,然后可以使用本地工作区更新到具有类似文件夹结构的不同分支或存储库。

svn export [-r REV] URL[@PEGREV] [PATH]

Eg : http://svnbook.red-bean.com/en/1.7/svn.ref.svn.c.export.html

http://svnbook.red-bean.com/en/1.7/svn.ref.svn.c.export.html

http://svnbook.red-bean.com/en/1.7/svn.ref.svn.c.export.html