That problem, although showing always the same face (git-bash
just not starting), can obviously occur due to many reasons. In my case, none of the other solutions helped; I had re-installed Git for Windows a dozen times to no avail. I was using version 2.42.
During those installations, I had chosen mintty
as terminal, because the alternative cmd
is just not usable IMHO. Finally, I uninstalled Git for Windows again and examined my user profile directory (that Git bash considers to be the home directory). I noticed that there was a .minttyrc
configuration file even after having uninstalled Git for Windows.
After having deleted that file and after having re-installed Git for Windows, git-bash
was working as expected. Obviously, .minttyrc
was damaged to a degree that it prevented mintty
(and hence, git-bash
) from starting.
That also explains why git-bash
may run when started in administrator context, and may not run when started in normal user context: The profile directory is different for each user. Administrator
's home directory may contain a valid .minttyrc
, while another user profile might contain a damaged one.
Bottom line:
When uninstalling (or upgrading) Git for Windows, it may leave damaged .minttyrc
files in users' profile directories (that is, in users' home directories from a bash point of view).
The damage may prevent git-bash
from starting.
Hence, if none of the previous solutions helps, just delete the .minttyrc
file in the profile directory of the user in whose context git-bash.exe
should start; normally, that directory is c:\Users\<username>
.
Note that you do not need to uninstall and re-install Git for Windows to see the effect. Please also note that deleting .minttyrc
will destroy the settings if you already have configured mintty
to your needs. However, that configuration is extremely easy and takes only a few seconds.