git 正在执行 VCS 刷新...(花费太长时间或从未完成)

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

Performing VCS Refresh... (Takes too long or never finishes)

gitintellij-ideasvnphpstorm

提问by quarks

What is the fix for the issue when trying to commit from IntelliJ:

尝试从 IntelliJ 提交时解决此问题的方法是什么:

enter image description here

在此处输入图片说明

This windows either takes too long or does not finished at all. What is the work around so I can commit again from IntelliJ

此窗口要么花费太长时间,要么根本没有完成。有什么解决办法,以便我可以从 IntelliJ 再次提交

采纳答案by VonC

What is the work around so I can commit again from IntelliJ

有什么解决办法,以便我可以从 IntelliJ 再次提交

On IntelliJ, not sure: older similar bugs have been closed (as "obsolete"), like IDEA-63491

在 IntelliJ 上,不确定:旧的类似错误已被关闭(作为“过时”),例如IDEA-63491

A more recent one (IDEA-93086) states:

最近的一个(IDEA-93086)指出:

It works again after a fresh checkout.

重新结帐后,它又可以工作了。

As a workaround, the solution would be to push from the command-line (so outside IntelliJ).

作为一种解决方法,解决方案是从命令行推送(因此在 IntelliJ 之外)。

回答by Rushi Ayyappa

In IntelliJ navigate to:

在 IntelliJ 中导航到:

File > Invalidate Caches / Restart...

文件 > 使缓存无效/重新启动...

and select the highlighted:

并选择突出显示的:

Invalidate and Restart

失效并重启

回答by Jason Suave

Just ran into this issue on WebStorm 2016.1 on Windows 8.1. What fixed it for me is deleting the vcs-log directory. I also have IntelliJ Community Edition installed which didn't have this problem at the time so I figured it must be an issue with the application settings (hidden directory in home folder) not the project specific settings (.idea folder in the project directory).

刚刚在 Windows 8.1 上的 WebStorm 2016.1 上遇到了这个问题。为我修复的是删除 vcs-log 目录。我还安装了 IntelliJ 社区版,当时没有这个问题,所以我认为它一定是应用程序设置(主文件夹中的隐藏目录)而不是项目特定设置(项目目录中的 .idea 文件夹)的问题.

Close IntelliJ/Webstorm and go to your home folder, you'll find a hidden directory there where IntelliJ/Webstorm keeps it's configuration. (The name of this hidden directory depends on the application name (IntelliJ/PHPStorm/Webstorm) and it's version:

关闭 IntelliJ/Webstorm 并转到您的主文件夹,您会在那里找到一个隐藏目录,IntelliJ/Webstorm 保存其配置。(此隐藏目录的名称取决于应用程序名称(IntelliJ/PHPStorm/Webstorm)及其版本:

C:\Users\{ your user name of pc }\.WebStorm2016.1

Inside there is a system folder which in turn has a vcs-log folder.

里面有一个系统文件夹,该文件夹又包含一个 vcs-log 文件夹。

C:\Users\{ your user name of pc }\.WebStorm2016.1\system\vcs-log

Delete or rename the vcs-logfolder and restart the application and everything should return to normal.

删除或重命名vcs-log文件夹并重新启动应用程序,一切都会恢复正常。

回答by Kvlknctk

If you are complaining that it is slow when you commit, you can follow the steps below.

如果您在提交时抱怨它很慢,您可以按照以下步骤操作。

Go to git commit screen with command + K

使用命令 + K 转到 git commit 屏幕

Right Click Unversioned File

右键单击未版本控制的文件

Disable Show Unversioned Files

禁用显示未版本控制的文件

Like this

像这样

回答by Rob Doe

A fresh checkout did nothing for me.

新的结帐对我没有任何帮助。

However, this helped: "I have two projects open. One is using SVN and the other is not. When I close the one that is not using SVN. The system is responsive and I can checkin once again." Source

但是,这有帮助:“我打开了两个项目。一个正在使用 SVN,另一个没有。当我关闭一个没有使用 SVN 的项目时。系统响应迅速,我可以再次签入。” 来源

So I removed all of my projects from the workspace, including the hidden folder .idea, and thus created a fresh workspace. Then I checked out one project via SVN, and ever since I can commit again.

所以我从工作区中删除了我的所有项目,包括隐藏文件夹 .idea,从而创建了一个新的工作区。然后我通过 SVN 检查了一个项目,从此我可以再次提交

回答by Adel

I have the some problem , to fix it open 32bit version, not 64.

我有一些问题,要修复它,请打开 32 位版本,而不是 64。

回答by Sergei V Kim

I had the same problem with PyCharm and none of the above solutions helped me.

我在 PyCharm 上遇到了同样的问题,上述解决方案都没有帮助我。

What worked for me was the following:

对我有用的是以下内容:

  1. Rename project's folder
  2. Removed .idea folder
  3. Rename the project's folder to previous name
  4. Open it with PyCharm and the annoying "Performing VCS Refresh" was gone.
  1. 重命名项目文件夹
  2. 删除了 .idea 文件夹
  3. 将项目的文件夹重命名为以前的名称
  4. 用 PyCharm 打开它,烦人的“执行 VCS 刷新”就消失了。

回答by Sergei V Kim

I had this problem on a windows 10 pc. My solution was changing line endings see below.

我在 Windows 10 电脑上遇到了这个问题。我的解决方案是改变行尾,见下文。

Refreshing a repository after changing line endings

更改行尾后刷新存储库

After you've set the core.autocrlf option and committed a .gitattributes file, you may find that Git wants to commit files that you have not modified. At this point, Git is eager to change the line endings of every file for you.

在您设置 core.autocrlf 选项并提交 .gitattributes 文件后,您可能会发现 Git 想要提交您尚未修改的文件。此时,Git 急于为您更改每个文件的行尾。

The best way to automatically configure your repository's line endings is to first backup your files with Git, delete every file in your repository (except the .git directory), and then restore the files all at once.

自动配置存储库行尾的最佳方法是首先使用 Git 备份文件,删除存储库中的每个文件(.git 目录除外),然后一次性恢复所有文件。

Save your current files in Git, so that none of your work is lost.

将您当前的文件保存在 Git 中,这样您的任何工作都不会丢失。

git add . -u git commit -m "Saving files before refreshing line endings" Remove the index and force Git to rescan the working directory.

git 添加。-u git commit -m "在刷新行结束前保存文件" 删除索引并强制 Git 重新扫描工作目录。

rm .git/index Rewrite the Git index to pick up all the new line endings.

rm .git/index 重写 Git 索引以获取所有新行结尾。

git reset Show the rewritten, normalized files.

git reset 显示重写的、规范化的文件。

git status Add all your changed files back, and prepare them for a commit. This is your chance to inspect which files, if any, were unchanged.

git status 将所有更改的文件添加回来,并为提交做好准备。这是您检查哪些文件(如果有)未更改的机会。

git add -u

git add -u

It is perfectly safe to see a lot of messages here that read

在这里看到很多阅读的消息是完全安全的

"warning: CRLF will be replaced by LF in file."

“警告:CRLF 将被文件中的 LF 替换。”

Rewrite the .gitattributes file.

重写 .gitattributes 文件。

git add .gitattributes Commit the changes to your repository.

git add .gitattributes 将更改提交到您的存储库。

git commit -m "Normalize all the line endings"

git commit -m "规范化所有行尾"

Source: https://help.github.com/articles/dealing-with-line-endings/#refreshing-a-repository-after-changing-line-endings

来源:https: //help.github.com/articles/dealing-with-line-endings/#refreshing-a-repository-after-changed-line-endings

回答by Srinivasan

I have found that in IntelliJ IDEA, using the "Directory" option (and not "Project") of "Version Control" settings and adding only the project directories used will make the VCS refresh fast and responsive. The IDEA version 2019.3 has a bug regarding this that is fixed in 2019.3.1

我发现在 IntelliJ IDEA 中,使用“版本控制”设置的“目录”选项(而不是“项目”)并仅添加使用的项目目录将使 VCS 刷新快速且响应迅速。IDEA 2019.3版有一个关于此的错误,已在2019.3.1修复

回答by Chip Liu

When I use Git, IDEA VCS works well. But when I use Subversion, this question still exists and file status refresh slowly in IDEA. I have tried many top ranking methods, but they doesn't solve my problem. I remembered I update TortoiseSVN to version 1.13.1 recently. Finally, I downgraded TortoiseSVN's versionto 1.10.5, problem solved.TortoiseSVN provides v1.13.1 and v1.10.5 on download page.. Someone can try this method if top ranking methods are useless for you.

当我使用 Git 时,IDEA VCS 运行良好。但是当我使用Subversion 时,这个问题仍然存在,并且文件状态在 IDEA 中刷新缓慢。我尝试了许多排名靠前的方法,但它们并没有解决我的问题。我记得我最近将 TortoiseSVN 更新到了 1.13.1 版本。最后,我将 TortoiseSVN 的版本降级1.10.5,问题解决了。TortoiseSVN 在下载页面提供 v1.13.1 和 v1.10.5。. 如果排名靠前的方法对你没用,有人可以尝试这种方法。