![Windows git bash tutorial](https://kumkoniak.com/2.jpg)
![windows git bash tutorial windows git bash tutorial](https://www.jquery-az.com/wp-content/uploads/2018/06/4.0_4-Git-local-pull.png)
![windows git bash tutorial windows git bash tutorial](https://adamtheautomator.com/wp-content/uploads/2021/08/open-git.png)
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. You will get this prompt : Welcome to Git (version 1.7.11-preview20120710) profileĪnd test.sh that looks like this : echo Hello, World! profile that looks like this : echo Executing.
- Add this line : ~/test.sh (ajdust the path if needed).
- Edit or create ~/.profile (try vi ~/.profile).
- On the other hand, if you want to run a script and get your shell back, you should :
In other words, to run the file D:\temp\test.sh in the Git shell and leave it running, create this batch file : C:\WINNT\system32\cmd.exe /c ""C:\Git\bin\sh.exe" -login -i - D:\temp\test.sh" The trick is that when the script file name is interpreted, it uses the Windows path, not the equivalent path in the sh/Git environment. If you want run (and leave running) a shell script in the context of the shell, specify it at the command line. Git bash is already a batch file with content similar to this : C:\WINNT\system32\cmd.exe /c ""C:\Git\bin\sh.exe" -login -i"