从Eclipse中删除git存储库

时间:2016-02-23 22:06:35

标签: eclipse git

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

2 个答案:

答案 0 :(得分:8)

在Eclipse中转到//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Purpose: Store current properties and create a trigger to start the script after 1 min // Input: propertyCarrier object (current script execution properties) // Output: Created trigger ID function autoTrigger(passProperties, sysKeys) { var sysProperties = new systemProperties(); if (typeof sysKeys === 'undefined' || sysKeys === null) { sysKeys = new systemKeys(); } var triggerID = ScriptApp.newTrigger('stateRebuild') .timeBased() .after(60000) .create() .getUniqueId(); Logger.log('~~~ RESTART TRIGGER CREATED ~~~'); //-------------------------------------------------------------------------- // In order to properly retrieve the time later, it is stored in milliseconds passProperties.timeframe.start = passProperties.timeframe.start.getTime(); passProperties.timeframe.end = passProperties.timeframe.end.getTime(); //-------------------------------------------------------------------------- //-------------------------------------------------------------------------- // Properties are stored in User Properties using JSON PropertiesService.getUserProperties() .setProperty(sysKeys.startup.rebuildCache, JSON.stringify(passProperties)); //-------------------------------------------------------------------------- Logger.log('~~~ CURRENT PROPERTIES STORED ~~~'); return triggerID; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 然后选择Window > Show View -> Other...。现在应该可以看到包含所有Git存储库的视图。右键单击要删除的存储库,然后选择Git > Git Repositories。 Eclipse现在将要求确认并为您提供删除所有存储库数据的选项。

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

答案 1 :(得分:2)

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

  1. 首先切换到 Git 透视图( 窗口 - >打开透视图 - >其他 - >搜索Git

  2. Git存储库 部分中,右键单击您的存储库,然后选择 从视图中删除存储库 。这将提示您确认是否要从此存储库中删除在Eclipse中导入的项目。点击 ,您就完成了。