Git-Bash Command Prompt won't open up after upgrading to Windows 10

36,323

Solution 1

There have been few instances where other users who have upgraded to windows 10 are facing similar issues with respect to Git Bash and git in general. An issue has been opened with msysgit on GitHub. Official clarification will be posted on that page very soon.

A similar issue but not related to Git Bash particularly on Windows 10 platform is being resolved here.

If your issue is not very serious, it is advisable to uninstall and install an appropriate version of Git Bash for Windows 10.

Solution 2

I have to face the same problem when upgraded my windows from 7 to 10. I tried by reinstalling the git bash but re installation not works for me.it is due to the permission issue with the shell script parser sh.exe file. all you need to do is use bash as your shell script parser instead of sh.

you can do that as below.

Step 1:

Resolve the issue with the shortcut

  • right click and open properties dialog of the Git Bash short cut located in your desktop or in your start menu (C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Git\Git Bash.lnk in my PC), you will see the below Target in the "Short cut" tab.

    "C:\Program Files\Git\bin\sh.exe" --login -i"

    just replace sh.exe to bash.exe as below

    "C:\Program Files\Git\bin\bash.exe" --login -i"

Step 2 :

  • Resolve the problems with the sh commands.

    Go to the Git Bash bin folder (C:\Program Files\Git\bin in my PC)

    Take a backup : copy the sh.exe file into old-sh.exe and delete the sh.exe file

    open the git bash and execute below commands.

    • cd /bin
    • ln /bin/bash.exe sh

it worked for me. don't know the same will workout for you.

Share:
36,323
pelican
Author by

pelican

Updated on July 10, 2022

Comments

  • pelican
    pelican almost 2 years

    I just upgraded my OS to Windows 10 and Git Bash won't even open up anymore. I might need to uninstall and re-install it again but I was just wondering if anyone else ran into this problem after upgrading to Windows 10 and what their fix was other than un-installing and re-installing ?

  • Brendan White
    Brendan White almost 7 years
    This solution worked for my WIndows 7 box as well - so it's not just Win 10 that's affected by this problem (and fixed by this fix).
  • Mark Schultheiss
    Mark Schultheiss about 6 years
    Win 10, Right Click icon, Properties/Advanced button - check the "Run as administrator" should do the same thing but always use.