本文介绍了尽管运行gc和prune,所有关键的git命令都已挂起的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的Windows 10计算机上,通过cmder终端,每个重要的git命令现在都完全挂起了.我还未等5分钟以上即可取消.

On my windows 10 machine via cmder terminal, every single important git command is now hanging completely. I haven't waited more than 5 minutes to cancel.

例如,git pull将无限期地挂起.然后,我将按ctrl + c,当我运行git status(对此没有问题)时,我将看到文件正在更新.但是,git日志中未显示任何提交.

For example, git pull will just hang indefinitely. I will then press ctrl+c, and when I run git status (no problem with this) I'll see files being updated. However, no commit is shown in the git log.

git checkout也挂了,什么也没发生.

git checkout is also hanging, nothing is happening.

我不知道该如何解决.我已经运行git prune,git gc和git fsck-无法访问.当我运行git fsck --unreachable或git fsck时,什么都没有显示,而当我运行git prune时,它什么也没有完成. Git gc也完成了,但未解决任何问题.

I have no idea how to fix this. I have run git prune, git gc, and git fsck --unreachable. Nothing showed up when I ran git fsck --unreachable or git fsck at all, and when I ran git prune it just completed but fixed nothing. Git gc also completed but fixed nothing.

运行strace git checkout <branch>

λ strace git checkout develop
--- Process 28092 created
--- Process 28092 loaded C:\Windows\System32\ntdll.dll at 00007ffa2c0b0000
--- Process 28092 loaded C:\Windows\System32\kernel32.dll at 00007ffa29710000
--- Process 28092 loaded C:\Windows\System32\KernelBase.dll at 00007ffa28a10000
--- Process 28092 loaded C:\Windows\System32\msvcrt.dll at 00007ffa29670000
--- Process 28092 thread 16828 created
--- Process 28092 loaded C:\Windows\System32\shell32.dll at 00007ffa29dc0000
--- Process 28092 loaded C:\Windows\System32\cfgmgr32.dll at 00007ffa29290000
--- Process 28092 loaded C:\Windows\System32\ucrtbase.dll at 00007ffa29190000
--- Process 28092 thread 25116 created
--- Process 28092 loaded C:\Windows\System32\SHCore.dll at 00007ffa2b5c0000
--- Process 28092 loaded C:\Windows\System32\rpcrt4.dll at 00007ffa29a70000
--- Process 28092 loaded C:\Windows\System32\combase.dll at 00007ffa292e0000
--- Process 28092 loaded C:\Windows\System32\bcryptprimitives.dll at 00007ffa281a0000
--- Process 28092 thread 19616 created
--- Process 28092 loaded C:\Windows\System32\windows.storage.dll at 00007ffa28220000
--- Process 28092 loaded C:\Windows\System32\msvcp_win.dll at 00007ffa28970000
--- Process 28092 loaded C:\Windows\System32\sechost.dll at 00007ffa2b380000
--- Process 28092 loaded C:\Windows\System32\advapi32.dll at 00007ffa29c80000
--- Process 28092 loaded C:\Windows\System32\profapi.dll at 00007ffa28130000
--- Process 28092 loaded C:\Windows\System32\powrprof.dll at 00007ffa280b0000
--- Process 28092 loaded C:\Windows\System32\shlwapi.dll at 00007ffa29ba0000
--- Process 28092 loaded C:\Windows\System32\gdi32.dll at 00007ffa29a30000
--- Process 28092 loaded C:\Windows\System32\gdi32full.dll at 00007ffa28f70000
--- Process 28092 loaded C:\Windows\System32\user32.dll at 00007ffa2b420000
--- Process 28092 loaded C:\Windows\System32\win32u.dll at 00007ffa29170000
--- Process 28092 loaded C:\Windows\System32\kernel.appcore.dll at 00007ffa28110000
--- Process 28092 loaded C:\Windows\System32\cryptsp.dll at 00007ffa28180000
--- Process 28092 loaded C:\Windows\System32\imm32.dll at 00007ffa29a00000
--- Process 28092 loaded C:\Users\dontdoxpls\Desktop\cmder\vendor\conemu-maximus5\ConEmu\ConEmuHk64.dll at 00007e1100000000
--- Process 25040 created
--- Process 25040 loaded C:\Windows\System32\ntdll.dll at 00007ffa2c0b0000
--- Process 25040 loaded C:\Windows\System32\kernel32.dll at 00007ffa29710000
--- Process 25040 loaded C:\Windows\System32\KernelBase.dll at 00007ffa28a10000
--- Process 25040 thread 28028 created
--- Process 25040 thread 9448 created
--- Process 25040 thread 26428 created
--- Process 25040 loaded C:\Windows\System32\advapi32.dll at 00007ffa29c80000
--- Process 25040 loaded C:\Users\dontdoxpls\Desktop\cmder\vendor\git-for-windows\mingw64\bin\libintl-8.dll at 0000000061cc0000
--- Process 25040 loaded C:\Users\dontdoxpls\Desktop\cmder\vendor\git-for-windows\mingw64\bin\libiconv-2.dll at 0000000066000000
--- Process 25040 loaded C:\Windows\System32\msvcrt.dll at 00007ffa29670000
--- Process 25040 loaded C:\Users\dontdoxpls\Desktop\cmder\vendor\git-for-windows\mingw64\bin\libpcre-1.dll at 0000000069140000
--- Process 25040 loaded C:\Windows\System32\msvcrt.dll at 0000000001a20000
--- Process 25040 loaded C:\Windows\System32\sechost.dll at 00007ffa2b380000
--- Process 25040 unloaded DLL at 0000000001a20000
--- Process 25040 loaded C:\Users\dontdoxpls\Desktop\cmder\vendor\git-for-windows\mingw64\bin\zlib1.dll at 0000000062e80000
--- Process 25040 loaded C:\Windows\System32\rpcrt4.dll at 00007ffa29a70000
--- Process 25040 loaded C:\Windows\System32\user32.dll at 00007ffa2b420000
--- Process 25040 loaded C:\Windows\System32\win32u.dll at 00007ffa29170000
--- Process 25040 loaded C:\Windows\System32\gdi32.dll at 00007ffa29a30000
--- Process 25040 loaded C:\Windows\System32\gdi32full.dll at 00007ffa28f70000
--- Process 25040 loaded C:\Windows\System32\msvcp_win.dll at 00007ffa28970000
--- Process 25040 loaded C:\Windows\System32\ucrtbase.dll at 00007ffa29190000
--- Process 25040 loaded C:\Windows\System32\ws2_32.dll at 00007ffa2b310000
--- Process 25040 loaded C:\Users\dontdoxpls\Desktop\cmder\vendor\git-for-windows\mingw64\bin\libssp-0.dll at 0000000068ac0000
--- Process 25040 loaded C:\Windows\System32\imm32.dll at 00007ffa29a00000
--- Process 25040 loaded C:\Windows\System32\cryptsp.dll at 00007ffa28180000
--- Process 25040 loaded C:\Windows\System32\rsaenh.dll at 00007ffa27250000
--- Process 25040 loaded C:\Windows\System32\bcrypt.dll at 00007ffa28e90000
--- Process 25040 loaded C:\Windows\System32\cryptbase.dll at 00007ffa27b10000
--- Process 25040 loaded C:\Windows\System32\bcryptprimitives.dll at 00007ffa281a0000
--- Process 25040 loaded C:\Users\dontdoxpls\Desktop\cmder\vendor\conemu-maximus5\ConEmu\ConEmuHk64.dll at 00007e1100000000
--- Process 25040 thread 25204 created
--- Process 25040 thread 21648 created
--- Process 25040 thread 16420 created
--- Process 25040 thread 28384 created
--- Process 25040 thread 21212 created
--- Process 25040 thread 8304 created
--- Process 25040 thread 5732 created
--- Process 25040 thread 19088 created
--- Process 25040 thread 15156 created
--- Process 25040 thread 29212 created
--- Process 25040 thread 29892 created
--- Process 25040 thread 28188 created
--- Process 25040 thread 28292 created
--- Process 25040 thread 20504 created
--- Process 25040 thread 1768 created
--- Process 25040 thread 14520 created
--- Process 25040 thread 16080 created
--- Process 25040 thread 24820 created
--- Process 25040 thread 28384 exited with status 0x0
--- Process 25040 thread 1768 exited with status 0x0
--- Process 25040 thread 28292 exited with status 0x0
--- Process 25040 thread 20504 exited with status 0x0
--- Process 25040 thread 16080 exited with status 0x0
--- Process 25040 thread 14520 exited with status 0x0
--- Process 25040 thread 15156 exited with status 0x0
--- Process 25040 thread 24820 exited with status 0x0
--- Process 25040 thread 8304 exited with status 0x0
--- Process 25040 thread 21648 exited with status 0x0
--- Process 25040 thread 28188 exited with status 0x0
--- Process 25040 thread 19088 exited with status 0x0
--- Process 25040 thread 21212 exited with status 0x0
--- Process 25040 thread 29892 exited with status 0x0
--- Process 25040 thread 5732 exited with status 0x0
--- Process 25040 thread 29212 exited with status 0x0
--- Process 25040 thread 16420 exited with status 0x0
--- Process 25040 thread 19684 created

这不是完整的输出.当我编辑此问题时,一些线程退出了.所以它挂在线程创建上了?

this isn't the full output. While I was editing this question some threads exited. so it's hanging on the thread creation?

这绝对不是cmder问题.我只是跑了git bash并遇到了同样的问题.我做了GIT_TRACE=1 git checkout <branch>,它什么也没产生,只有这个

This definitely is not a cmder issue either. I just ran git bash and am running into the same issue. I did GIT_TRACE=1 git checkout <branch> and it produced nothing, only this

$ GIT_TRACE=1 git checkout develop
20:31:33.554953 exec-cmd.c:236          trace: resolved executable dir: C:/Program Files/Git/mingw64/bin
20:31:33.559955 git.c:419               trace: built-in: git checkout develop

问题已解决,方法是重新启动计算机.我不知道为什么要解决此问题,或者是首先导致此问题的原因.希望有人能找到一个解释.

The issue was resolved by restarting my computer. I am not sure why that fixed it or what caused the issue in the first place. Hopefully someone will find an explanation.

推荐答案

问题通过重新启动PC得以解决.我不知道为什么要修复它,或者首先导致问题的原因.希望有人会找到很好的解释.

The issue was resolved by restarting my PC. I am not sure why that fixed it or what caused the problem in the first place. Hopefully someone will find a good explanation.

这篇关于尽管运行gc和prune,所有关键的git命令都已挂起的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-04 20:56