Git扩展:直到昨天,一切都工作得很好。

但突然我得到这个错误时,我试图拉一些仓库使用git扩展

C:\Program Files\Git\bin\git.exe pull --progress "origin" 
Done
    0 [main] us 0 init_cheap: VirtualAlloc pointer is null, Win32 error 487
AllocationBase 0x0, BaseAddress 0x68560000, RegionSize 0x390000, State 0x10000
C:\Program Files\Git\bin\sh.exe: *** Couldn't reserve space for cygwin's heap, Win32 error 0

我克隆的所有存储库都发生了这种情况。 但是,我的git bash运行良好。 我完全不知道发生了什么。知道为什么会这样吗?


当前回答

如果重新启动没有纠正这个问题(正如Greg Hegwill的回答所建议的那样),那么检查您的PATH是否有冲突的msys-1.0.dll安装(可能还有其他相关的dll)。

在我的特殊情况下,MinGW的msys安装在其bin目录(<MinGW_Install_Path>\msys\1.0\bin)中有该DLL的副本,并且它列在PATH中。Git的cmd目录列在PATH中,但它的bin没有。(Git的msys-1.0.dll版本在bin目录下。显然,MSys-Git的默认安装不会将其bin添加到PATH中。)

一个临时的修复是将Git的bin目录添加到PATH中,这样它就会出现在MinGW的路径之前。(一个更永久的修复可能涉及整理MinGW的msys和Git之间的路径冲突和/或删除重复的msys安装。)

其他回答

I ran into this today. Led by Greg Hewgill's answer, I looked at running processes on my system to see if anything was "stuck" or if other users were logged into the machine doing anything with git. I then launched cygwin (installed separately) on this particular machine. It launched ok. I closed it and then tried the Git Extensions again (I was trying a pull operation) and it worked. Not sure if the launching of cygwin cleared something that was shared but this is the first time I ran into this error and this seemed to fix it for me.

我也有同样的问题,在一些Windows 8.0崩溃和更新后,在msys git 1.9。我没有在我的路径中找到任何msys/git,所以我只是在windows本地用户环境设置中添加了它。它无需重新启动就能工作。

基本上,类似于roberb,但我没有任何git/msys在我的路径。

Btw:

我尝试使用rebase -b blablabla msys.dll,但有错误“ReBaseImage (msys-1.0.dll)失败,最后错误= 6” 如果你需要这个很快,没有时间调试,我注意到“Git Bash”。Git目录下的vbs成功启动bash shell。

C:\msysgit\bin>rebase.exe -b 0x50000000 msys-1.0.dll

为了解决这个问题,我简单地让Tortoise Git安装了更新。

非常简单的rebase解决方案:

进入安装git的文件夹,例如:

C:\Program Files (x86)\Git\bin

通过按住shift并在文件夹中右键单击,您应该能够以管理员身份从那里打开命令提示符(感谢https://stackoverflow.com/users/355389/darren-lewis的评论),

然后运行:

rebase.exe -b 0x50000000 msys-1.0.dll

当重启方法不起作用时,这为我解决了问题。

希望能有所帮助。