Search code examples
gitbashmsysgit

msysgit - why are the 2 "open bash" commands acting differently


I run msysgit on Windows.

I have 2 ways to open the bash prompt:

  • Open it from the Windows Explorer context menu ("Right Click" > "Git Bash")
  • Open it from Git Gui ("Repository" Menu > "Git Bash")

The two windows that open when I do this appear identical, but they get grouped separately by windows, and only one of the two gets a Git Icon (context menu version)

What's going on here, and is there any easy way to fix this, or have I identified a bug that I should raise on the msysgit project?


Solution

  • It looks like the bash window that is opened from the 'Git Gui' is an instance of "sh.exe" and the window that is opened when you open 'Git Bash' is an instance of "bash.exe" these are two separate .exe files in the git bin directory.

    As a test, If you rename/remove the sh.exe file, the git gui, on opening will throw an error, but when you chose to open bash from it, it will now open bash.exe.

    Furthermore, both files have the exact same size, 584kb.

    I would at least raise an issue on the project to see if there is a good reason to do this.