An msysgit git bash session uses the script share/WinGit/Git Bash.vbs
, which doesn't access or modify the environment variable PATH
(like it would in this unrelated vbs script, for instance)
A git bash session will simply add in front of your current PATH
:
.:/usr/local/bin:/mingw/bin:/bin:
It is possible that the mingw session packaged with msysgit won't consider a bin
from another mingw installation: you can check it by setting another (simpler) directory to your PATH
and see if it is still visible in your git bash session. If not, then it is a more general issue which concerns all directories that you would add to the PATH.
fatal error - cygheap base mismatch detected.
This problem is probably due to using incompatible versions of the cygwin DLL.
This error is caused because the Git for Windows path is incompatible with Cywin.
They both use /bin
and /usr/bin
but these map to different directories (because they use different mount tables).
Cywin expects to find the dll in /usr/bin/cygwin1.dll
(and is not found in Git for Windows)
When you explicitly run any Cygwin command in a Git for Windows bash
shell Cygwin cannot find its dll and generates the error message above.
Notice below that the mount mapping for /
is different.
Git for Windows:
DavidPostill@Hal MINGW64 ~
$ mount
C:/temp on /tmp type ntfs (binary,noacl,posix=0,usertemp)
C:/apps/Git on / type ntfs (binary,noacl,auto)
C:/apps/Git/usr/bin on /bin type ntfs (binary,noacl,auto)
C: on /c type ntfs (binary,noacl,posix=0,user,noumount,auto)
E: on /e type vfat (binary,noacl,posix=0,user,noumount,auto)
F: on /f type ntfs (binary,noacl,posix=0,user,noumount,auto)
DavidPostill@Hal MINGW64 ~
$ which cygwin1.dll
which: no cygwin1.dll in (/c/Users/DavidPostill/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/mingw64/bin:/usr/bin:/c/Users/DavidPostill/bin:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/c/apps/WSCC/Sysinternals Suite:/c/apps/WSCC/NirSoft Utilities:/c/apps/Calibre:/cmd:/mingw64/bin:/usr/bin:/usr/bin/vendor_perl:/usr/bin/core_perl)
DavidPostill@Hal MINGW64 ~
$ /c/cygwin/bin/man
1 [main] man (608) C:\cygwin\bin\man.exe: *** fatal error - cygheap base mismatch detected - 0x180301408/0x180304408.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version. The most recent version *should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution. Rebooting is also suggested if you
are unable to find another cygwin DLL.
Segmentation fault
Cygwin:
$ mount
C:/cygwin/bin on /usr/bin type ntfs (binary,auto)
C:/cygwin/lib on /usr/lib type ntfs (binary,auto)
C:/cygwin on / type ntfs (binary,auto)
C: on /c type ntfs (binary,posix=0,user,noumount,auto)
E: on /e type vfat (binary,posix=0,user,noumount,auto)
F: on /f type ntfs (binary,posix=0,user,noumount,auto)
$ which cygwin1.dll
/usr/bin/cygwin1.dll
$ /c/cygwin/bin/man
What manual page do you want?
There is no solution, other than don't mix and match cygwin derived utilities. Pick one and stick with it.
Best Answer
The Windows Git installer does have some configuration options; though, I do not remember if the bash shell is one of the optional parts. That said, there is no reason why you have to use the bash shell for git. You can run git commands from cmd as well as PowerShell.
There is a nice add-in component for enhancing PowerShell with git integration. I do all of my git interaction from PowerShell. I have never opened up the bash shell, assuming that it was even installed with git.