git问题(警告:shell级别(1000)太高,重置为1等..)

Posted

技术标签:

【中文标题】git问题(警告:shell级别(1000)太高,重置为1等..)【英文标题】:Problem with git (warning: shell level (1000) too high, resetting to 1, etc..) 【发布时间】:2022-01-05 15:54:39 【问题描述】:

想学习git,所以我下载了它并写了一些东西。 当我今天打开它时,它“崩溃”了我的 Windows 10,然后显示了十分之几的错误。我尝试在 Visual Studio 代码中工作,但是当我编写一些像 ls-la 这样的 git 命令时,它告诉我它无法识别这个命令。可能是我在powershell终端中。

这里有一些图片:

我打开 git

由于 git 消耗过多内存,Windows 崩溃

我尝试关闭 git 但弹出此窗口

一段时间后 git 会正常加载

错误消息:

/usr/bin/bash: warning: shell level (1000) too high, resetting to 1
      0 [main] bash 4187 dofork: child -1 - forked process 68440 died unexpectedly, retry 0, exit code 0xC000012D, errno 11
/c/Users/GRZEG/.bashrc: fork: retry: Resource temporarily unavailable
1040411 [main] bash 4187 dofork: child -1 - forked process 68468 died unexpectedly, retry 0, exit code 0xC000012D, errno 11
/c/Users/GRZEG/.bashrc: fork: retry: Resource temporarily unavailable
      0 [main] bash (68508) C:\Program Files\Git\usr\bin\bash.exe: *** fatal error in forked process - MEM_COMMIT failed, Win32 error 1455
   5744 [main] bash (68508) cygwin_exception::open_stackdumpfile: Dumping stack trace to bash.exe.stackdump
3233984 [main] bash 4187 dofork: child -1 - forked process 68508 died unexpectedly, retry 0, exit code 0x100, errno 11
/c/Users/GRZEG/.bashrc: fork: retry: Resource temporarily unavailable
      0 [main] bash 4188 dofork: child -1 - forked process 55808 died unexpectedly, retry 0, exit code 0xC000012D, errno 11
/c/Users/GRZEG/.bashrc: fork: retry: Resource temporarily unavailable
      0 [main] bash (55876) C:\Program Files\Git\usr\bin\bash.exe: *** fatal error in forked process - MEM_COMMIT failed, Win32 error 1455
    421 [main] bash (55876) cygwin_exception::open_stackdumpfile: Dumping stack trace to bash.exe.stackdump
1188122 [main] bash 4188 dofork: child -1 - forked process 55876 died unexpectedly, retry 0, exit code 0x100, errno 11
/c/Users/GRZEG/.bashrc: fork: retry: Resource temporarily unavailable
      0 [main] bash (56044) C:\Program Files\Git\usr\bin\bash.exe: *** fatal error in forked process - MEM_COMMIT failed, Win32 error 1455
    600 [main] bash (56044) cygwin_exception::open_stackdumpfile: Dumping stack trace to bash.exe.stackdump
3381615 [main] bash 4188 dofork: child -1 - forked process 56044 died unexpectedly, retry 0, exit code 0x100, errno 11
/c/Users/GRZEG/.bashrc: fork: retry: Resource temporarily unavailable
      0 [main] bash (56208) C:\Program Files\Git\usr\bin\bash.exe: *** fatal error in forked process - MEM_COMMIT failed, Win32 error 1455
    419 [main] bash (56208) cygwin_exception::open_stackdumpfile: Dumping stack trace to bash.exe.stackdump
7600315 [main] bash 4188 dofork: child -1 - forked process 56208 died unexpectedly, retry 0, exit code 0x100, errno 11
/c/Users/GRZEG/.bashrc: fork: retry: Resource temporarily unavailable
      1 [main] bash (56728) C:\Program Files\Git\usr\bin\bash.exe: *** fatal error in forked process - MEM_COMMIT failed, Win32 error 1455
    455 [main] bash (56728) cygwin_exception::open_stackdumpfile: Dumping stack trace to bash.exe.stackdump
      0 [main] bash 4189 dofork: child -1 - forked process 56728 died unexpectedly, retry 0, exit code 0x100, errno 11
/c/Users/GRZEG/.bashrc: fork: retry: Resource temporarily unavailable
      0 [main] bash (57056) C:\Program Files\Git\usr\bin\bash.exe: *** fatal error in forked process - MEM_COMMIT failed, Win32 error 1455
    390 [main] bash (57056) cygwin_exception::open_stackdumpfile: Dumping stack trace to bash.exe.stackdump
      0 [main] bash 4190 dofork: child -1 - forked process 57056 died unexpectedly, retry 0, exit code 0x100, errno 11
/c/Users/GRZEG/.bashrc: fork: retry: Resource temporarily unavailable
      0 [main] bash (57196) C:\Program Files\Git\usr\bin\bash.exe: *** fatal error in forked process - MEM_COMMIT failed, Win32 error 1455
   1304 [main] bash (57196) cygwin_exception::open_stackdumpfile: Dumping stack trace to bash.exe.stackdump
1377111 [main] bash 4190 dofork: child -1 - forked process 57196 died unexpectedly, retry 0, exit code 0x100, errno 11
/c/Users/GRZEG/.bashrc: fork: retry: Resource temporarily unavailable
      1 [main] bash (57420) C:\Program Files\Git\usr\bin\bash.exe: *** fatal error in forked process - MEM_COMMIT failed, Win32 error 1455
   1044 [main] bash (57420) cygwin_exception::open_stackdumpfile: Dumping stack trace to bash.exe.stackdump
      0 [main] bash 4191 dofork: child -1 - forked process 57420 died unexpectedly, retry 0, exit code 0x100, errno 11
/c/Users/GRZEG/.bashrc: fork: retry: Resource temporarily unavailable
      1 [main] bash (57688) C:\Program Files\Git\usr\bin\bash.exe: *** fatal error in forked process - MEM_COMMIT failed, Win32 error 1455
   1326 [main] bash (57688) cygwin_exception::open_stackdumpfile: Dumping stack trace to bash.exe.stackdump
1272058 [main] bash 4191 dofork: child -1 - forked process 57688 died unexpectedly, retry 0, exit code 0x100, errno 11
/c/Users/GRZEG/.bashrc: fork: retry: Resource temporarily unavailable
3288717 [main] bash 4191 dofork: child -1 - forked process 58096 died unexpectedly, retry 0, exit code 0xC000012D, errno 11
/c/Users/GRZEG/.bashrc: fork: retry: Resource temporarily unavailable
7295303 [main] bash 4191 dofork: child -1 - CreateProcessW failed for 'C:\Program Files\Git\usr\bin\bash.exe', errno 11
/c/Users/GRZEG/.bashrc: fork: retry: Resource temporarily unavailable
      0 [main] bash (59256) C:\Program Files\Git\usr\bin\bash.exe: *** fatal error in forked process - MEM_COMMIT failed, Win32 error 1455
    474 [main] bash (59256) cygwin_exception::open_stackdumpfile: Dumping stack trace to bash.exe.stackdump
      0 [main] bash 4192 dofork: child -1 - forked process 59256 died unexpectedly, retry 0, exit code 0x100, errno 11
/c/Users/GRZEG/.bashrc: fork: retry: Resource temporarily unavailable
1041835 [main] bash 4192 dofork: child -1 - forked process 59464 died unexpectedly, retry 0, exit code 0xC000012D, errno 11
/c/Users/GRZEG/.bashrc: fork: retry: Resource temporarily unavailable
      0 [main] bash 4196 dofork: child -1 - forked process 68460 died unexpectedly, retry 0, exit code 0xC000012D, errno 11
/c/Users/GRZEG/.bashrc: fork: retry: Resource temporarily unavailable
      1 [main] bash (68516) C:\Program Files\Git\usr\bin\bash.exe: *** fatal error in forked process - MEM_COMMIT failed, Win32 error 1455
    352 [main] bash (68516) cygwin_exception::open_stackdumpfile: Dumping stack trace to bash.exe.stackdump
      0 [main] bash 4197 dofork: child -1 - forked process 68516 died unexpectedly, retry 0, exit code 0x100, errno 11
/c/Users/GRZEG/.bashrc: fork: retry: Resource temporarily unavailable
      0 [main] bash (63444) C:\Program Files\Git\usr\bin\bash.exe: *** fatal error in forked process - MEM_COMMIT failed, Win32 error 1455
    308 [main] bash (63444) cygwin_exception::open_stackdumpfile: Dumping stack trace to bash.exe.stackdump
      0 [main] bash 4207 dofork: child -1 - forked process 63444 died unexpectedly, retry 0, exit code 0x100, errno 11
/c/Users/GRZEG/.bashrc: fork: retry: Resource temporarily unavailable
1038461 [main] bash 4207 dofork: child -1 - forked process 63756 died unexpectedly, retry 0, exit code 0xC000012D, errno 11
/c/Users/GRZEG/.bashrc: fork: retry: Resource temporarily unavailable
      0 [main] bash (64068) C:\Program Files\Git\usr\bin\bash.exe: *** fatal error in forked process - MEM_COMMIT failed, Win32 error 1455
    423 [main] bash (64068) cygwin_exception::open_stackdumpfile: Dumping stack trace to bash.exe.stackdump
3258595 [main] bash 4207 dofork: child -1 - forked process 64068 died unexpectedly, retry 0, exit code 0x100, errno 11
/c/Users/GRZEG/.bashrc: fork: retry: Resource temporarily unavailable
      0 [main] bash 4209 dofork: child -1 - forked process 64404 died unexpectedly, retry 0, exit code 0xC000012D, errno 11
/c/Users/GRZEG/.bashrc: fork: retry: Resource temporarily unavailable
1036326 [main] bash 4209 dofork: child -1 - forked process 44524 died unexpectedly, retry 0, exit code 0xC000012D, errno 11
/c/Users/GRZEG/.bashrc: fork: retry: Resource temporarily unavailable
3060575 [main] bash 4209 dofork: child -1 - forked process 64712 died unexpectedly, retry 0, exit code 0xC000012D, errno 11
/c/Users/GRZEG/.bashrc: fork: retry: Resource temporarily unavailable
7078056 [main] bash 4209 dofork: child -1 - CreateProcessW failed for 'C:\Program Files\Git\usr\bin\bash.exe', errno 11
/c/Users/GRZEG/.bashrc: fork: retry: Resource temporarily unavailable
      0 [main] bash (44944) C:\Program Files\Git\usr\bin\bash.exe: *** fatal error in forked process - MEM_COMMIT failed, Win32 error 1455
    418 [main] bash (44944) cygwin_exception::open_stackdumpfile: Dumping stack trace to bash.exe.stackdump
/c/Users/GRZEG/.bashrc: fork: retry: Resource temporarily unavailable
      0 [main] bash 4249 dofork: child -1 - forked process 44944 died unexpectedly, retry 0, exit code 0x100, errno 11
      0 [main] bash (52852) C:\Program Files\Git\usr\bin\bash.exe: *** fatal error in forked process - MEM_COMMIT failed, Win32 error 1455
    496 [main] bash (52852) cygwin_exception::open_stackdumpfile: Dumping stack trace to bash.exe.stackdump
3150088 [main] bash 4249 dofork: child -1 - forked process 52852 died unexpectedly, retry 0, exit code 0x100, errno 11
/c/Users/GRZEG/.bashrc: fork: retry: Resource temporarily unavailable
      0 [main] bash (22312) C:\Program Files\Git\usr\bin\bash.exe: *** fatal error in forked process - MEM_COMMIT failed, Win32 error 1455
    349 [main] bash (22312) cygwin_exception::open_stackdumpfile: Dumping stack trace to bash.exe.stackdump
7943439 [main] bash 4249 dofork: child -1 - forked process 22312 died unexpectedly, retry 0, exit code 0x100, errno 11
/c/Users/GRZEG/.bashrc: fork: retry: Resource temporarily unavailable
      0 [main] bash (19268) C:\Program Files\Git\usr\bin\bash.exe: *** fatal error in forked process - MEM_COMMIT failed, Win32 error 1455
    344 [main] bash (19268) cygwin_exception::open_stackdumpfile: Dumping stack trace to bash.exe.stackdump
13178493 [main] bash 4249 dofork: child -1 - forked process 19268 died unexpectedly, retry 0, exit code 0x100, errno 11
/c/Users/GRZEG/.bashrc: fork: retry: Resource temporarily unavailable
      0 [main] bash (23236) C:\Program Files\Git\usr\bin\bash.exe: *** fatal error in forked process - MEM_COMMIT failed, Win32 error 1455
    379 [main] bash (23236) cygwin_exception::open_stackdumpfile: Dumping stack trace to bash.exe.stackdump
21902642 [main] bash 4249 dofork: child -1 - forked process 23236 died unexpectedly, retry 0, exit code 0x100, errno 11
/c/Users/GRZEG/.bashrc: fork: Resource temporarily unavailable

GRZEG@DESKTOP-25LL6A3 MINGW64 ~
$

我尝试使用 vscode,但正如我所说,ls -la 命令无法识别

bash.bashrc 文件

【问题讨论】:

检查文件.bashrc 中启动bash 的行,并删除或修复它。这将导致 bash 继续启动 bash,它来源 .bashrc,它启动 bash 等。Shell 级别 1000 意味着这种情况发生了 1000 次。 vscode 终端看起来像 powershell。 ls 通常别名为等效的 powershell Get-ChildItem,其中标志 -la 可能无效。 我在 C:\Program Files\Git\etc 中找到了 bash.bashrc 文件,但我完全不知道哪一行正在启动 bash。 @dan 我将此文件的内容添加到 pos 也许看看/c/Users/GRZEG/.bashrc。我想也许你在这里添加了一个错误。但是,如果您没有更改任何内容,请尝试重新安装,并仔细阅读安装/启动指南。另外,我强烈推荐 WSL 作为 git-bash 的替代品。 我不怎么用vscode,我不确定。我相信你可以谷歌它。我会尝试的另一件事是找到另一种启动 git-bash 的方法。例如 bash.exe 在 powershell 或开始菜单中。 【参考方案1】:

首先,确保(假设 VSCode 1.62.3 和 Git For Windows 2.34.1):

您根本没有%USERPROFILE%\.bashrc(以避免其内容产生任何副作用) 您已将C:\Program Files\Git\usr\bin\(包括ls.exe)添加到您的PATH(在启动VSCode之前) 您在 VSCode 中打开终端/Git bash 会话,甚至是常规 CMD 会话,而不是 Powershell 会话。

那么ls就应该被识别出来了,应该不会发生fork进程。

【讨论】:

不幸的是它没有工作 @Gorge 最新的 1.63/1.64 VSCode 和最新的 Git 2.35.1 有帮助吗? 如何完全删除 git 并安装最新版本? 它没有帮助。 @Gorge 只需输入git update-git-for-windows

以上是关于git问题(警告:shell级别(1000)太高,重置为1等..)的主要内容,如果未能解决你的问题,请参考以下文章

为什么国内的网盘公司都在 TB 的级别上竞争,成本会不会太高?(还有好多其它回复)

为啥搜索过滤器的工作级别太高?

git 私有仓库的创建以及使用

IE设置安全级别限制级别太高,怎么调低点。

浏览器级别太高,怎么调低呀!

“会不会改内存消耗太高”firefox的问题?