If you really need to force shell invocation in interactive mode, you can add the -i option.
You either need the full path to sh.exe or have it in your PATH environment variable (as others have already pointed out).Not interactive, the login shell startup files will be executed.Įxec bash -l or exec bash -login will replace the current To starting a login shell with exec -l bash. When the shell is interactive, this is equivalent -l ( -login): Make this shell act as if it had been directly invoked by login.To better understand what this command does, consult with official GNU docs about Invoking Bash: The answer is: add the following command to the Target: field of the shortcut: "C:\Git\bin\sh.exe" -l "D:\test.sh"
How to create a Windows shortcut that I can double click to run Other answers work, but there is a shorter solution, that fully answers the question, which was: Run 'git help ' to display help for specific commands. Run 'git help git' to display the help index. The last option is also interesting in that it installs a better font for all console windows. You will get this prompt : Welcome to Git (version 1.7.11-preview20120710) The Windows Explorer integration > Context menu entries option allows opening the Git command prompt (Git Bash) from any folder by clicking with the right mouse button on the folder and selecting Git Bash Here. profileĪnd test.sh that looks like this : echo Hello, World! profile that looks like this : echo Executing.