Eclipse (GGTS)“计算存储库 [用户名] 的 Git 状态”

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

Eclipse (GGTS) "Computing Git status for repository [username]"

eclipseegit

提问by osborp

Each time I save an edit in Eclipse (GGTS/STS v3.4) it automatically runs the task: Computing Git status for repository [username].

每次我在 Eclipse (GGTS/STS v3.4) 中保存编辑时,它会自动运行任务: Computing Git status for repository [username].

The CPU usage rockets but it never seems to make any progress. I've left the process running for up to 15 minutes before giving up and stopping it manually. It then restarts the next time I save a change.

CPU 使用率猛增,但似乎从未取得任何进展。在放弃并手动停止之前,我已经让该过程运行了长达 15 分钟。下次我保存更改时它会重新启动。

Presumably EGit is trying to synchronise but it isn't really clear what or why. Does anyone know why this might be happening and how to stop it?

据推测,EGit 正在尝试同步,但不清楚是什么或为什么。有谁知道为什么会发生这种情况以及如何阻止它?

回答by robinst

Older versions of EGit used to automatically connect a project to its Git repository in case it finds a .gitin any of the project's parent directories.

旧版本的 EGit 用于自动将项目连接到其 Git 存储库,以防它.git在项目的任何父目录中找到 a 。

In your case, it seems you have a Git repository in your home directory. Depending on the size of your home directory, this can take a long time.

就您而言,您的主目录中似乎有一个 Git 存储库。根据主目录的大小,这可能需要很长时间。

Since EGit 3.0.2, the home directory is no longer automatically indexed. So, make sure you are using EGit 3.0.2 or higher. In case you are using Eclipse 4.3.0, upgrade to 4.3.1. Otherwise upgrade to the newest version from the EGit download page.

从 EGit 3.0.2 开始,主目录不再自动索引。因此,请确保您使用的是 EGit 3.0.2 或更高版本。如果您使用的是 Eclipse 4.3.0,请升级到 4.3.1。否则从EGit 下载页面升级到最新版本。

After upgrading, open the Git Repositoriesview (using Ctrl+3 or Cmd+3 and typing its name). Then find the repository named [username] and remove it from the view.

升级后,打开Git Repositories视图(使用 Ctrl+3 或 Cmd+3 并键入其名称)。然后找到名为 [username] 的存储库并将其从视图中删除。

回答by mouaifulao

Amir Dahan and Ryan Poolos's answer does work. Thanks a lot. In Windows OS, you can open a "git bash" window if a git client was installed, then input the command.

Amir Dahan 和 Ryan Poolos 的回答确实有效。非常感谢。在 Windows 操作系统中,如果安装了 git 客户端,您可以打开一个“git bash”窗口,然后输入命令。

If you just delete the "properties.index",they can be created again when you start the Eclipse next time.

如果直接删除“properties.index”,下次启动Eclipse时可以重新创建。

回答by Amir Dahan

In order to stop this thread from running, try: rm -r .metadata/.plugins/org.eclipse.core.resources/.projects/*/org.eclipse.egit.core

为了阻止此线程运行,请尝试: rm -r .metadata/.plugins/org.eclipse.core.resources/.projects/*/org.eclipse.egit.core

and rm -r .metadata/.plugins/org.eclipse.core.resources/.projects/*/.indexes/properties.index

rm -r .metadata/.plugins/org.eclipse.core.resources/.projects/*/.indexes/properties.index

seems to be working! credit to http://willtipton.com/coding/2014/09/21/Eclipse-building-git-something.html

似乎正在工作!归功于http://willtipton.com/coding/2014/09/21/Eclipse-building-git-something.html

回答by K M

cleaning up org.eclipse.egit.core and properties.index was useful. It works for me to get rid of computing Git status issue.

清理 org.eclipse.egit.core 和 properties.index 很有用。它适用于我摆脱计算 Git 状态问题。

But now I cannot sync my project.

但现在我无法同步我的项目。