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运行良好。 我完全不知道发生了什么。知道为什么会这样吗?


当前回答

非常简单的rebase解决方案:

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

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

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

然后运行:

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

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

希望能有所帮助。

其他回答

如果重新启动没有纠正这个问题(正如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安装。)

我也有同样的问题。我在这里找到了解决方案http://jakob.engbloms.se/archives/1403

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

对我来说,解决方案略有不同。这是

C:\Program Files (x86)\Git\bin>rebase.exe -b 0x50000000 msys-1.0.dll

在你重基dll之前,你应该确保它没有被使用:

tasklist /m msys-1.0.dll

并备份:

copy msys-1.0.dll msys-1.0.dll.bak

如果rebase命令失败,如下所示:

ReBaseImage (msys-1.0.dll)失败,最后错误= 6

您需要依次执行以下步骤:

将dll复制到另一个目录 使用上面的命令改变副本的基础 用副本替换原来的dll。

如果有任何问题,以管理员身份运行命令

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

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 64位机器上为MTK平台进行交叉编译时遇到了同样的问题。MinGW和MSYS在构建过程中出现了这个问题。我通过修改msys-1.0.dll文件解决了这个问题。无论是rebase.exe还是系统重启对我都不起作用。

因为我的电脑上没有安装rebase.exe。我安装了cygwin64,并在里面使用了rebase.exe:

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

虽然改基看起来很成功,但错误仍然存在。然后我在Cygwin64终端内运行rebase命令,得到一个错误:

$ rebase -b 0x50000000 msys-1.0.dll
rebase: Invalid Baseaddress 0x50000000, must be > 0x200000000

后来我试了几个地址,但都不行。所以我最终改变了msys-1.0.dll文件,它解决了这个问题。