从 Eclipse 中删除 git 存储库

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

Remove git repository from Eclipse

eclipsegit

提问by Kody R.

I added a git repository to my project and then I hit Team > Disconnect. How do I remove this repository completely? I'm trying to set up a new git repository on my project, but I keep getting an error message.

我在我的项目中添加了一个 git 存储库,然后点击Team > Disconnect。如何完全删除此存储库?我正在尝试在我的项目中设置一个新的 git 存储库,但我不断收到错误消息。

回答by THelper

In Eclipse go to Window > Show View -> Other...Then select Git > Git Repositories. A view with all your Git repositories should now be visible. Right-click on the repository you want to remove and select Delete repository. Eclipse will now ask for a confirmation and give you the option to remove all repository data.

在 Eclipse 中转到Window > Show View -> Other...然后选择Git > Git Repositories。现在应该可以看到包含所有 Git 存储库的视图。右键单击要删除的存储库并选择Delete repository。Eclipse 现在将要求确认并为您提供删除所有存储库数据的选项。

In Eclipse Neon you can also delete a repository by hand (via the OS). In that case the repository will simply disappear in the Eclipse Git Repositories view. This is not recommended for older Eclipse versions!

在 Eclipse Neon 中,您还可以手动删除存储库(通过操作系统)。在这种情况下,存储库将直接消失在 Eclipse Git Repositories 视图中。对于较旧的 Eclipse 版本,不建议这样做!

回答by mantri

If you just want to remove the repository from the Eclipse but not want to delete the data from your computer, follow these steps :

如果您只想从 Eclipse 中删除存储库但不想从计算机中删除数据,请按照下列步骤操作:

  1. First switch to Gitperspective (Window - > Open Perspective -> Other -> Search for Git)

  2. In the Git Repositoriessection, right click your repository and select Remove Repository from View. This will prompt you to confirm if you want to remove the projects that are imported in Eclipse from this repository. Click Yesand you are done.

  1. 首先切换到Git透视图(Window -> Open Perspective -> Other -> Search for Git

  2. Git Repositories部分,右键单击您的存储库并选择Remove Repository from View。这将提示您确认是否要从此存储库中删除在 Eclipse 中导入的项目。单击,您就完成了。