How can I fix the error "fatal error - cygheap base mismatch detected" when using git on Windows 10?

There are several possible reasons for this error.

For example, you could indeed have a clashing version of the DLL.

However, recent versions of Windows 10 have a set of additional protection features built in that were originally part of Microsoft EMET.

Most notably, the ASLR (Address Space Layout Randomization) security feature is not compatible with the UNIX-like executables included with the Git for Windows installation.

In order to fix this issue, open the Exploit Protection settings, switch to the Program Settings tab and add the executable names listed in the errors (you may have quite a number).

In the example given, you can enter just basename.exe or the full path if you are a little more paranoid.

For each executable, turn off the ASLR protection.

For further reference, please see the following GitHub issue:

https://github.com/desktop/desktop/issues/3096