I want to start an application right after git
loads in a Windows batch file.
I normally use:
node server.js
How do I incorporate that into:
start "" "%SYSTEMDRIVE%\Program Files (x86)\Git\bin\sh.exe" --login -i
I want to start an application right after git
loads in a Windows batch file.
I normally use:
node server.js
How do I incorporate that into:
start "" "%SYSTEMDRIVE%\Program Files (x86)\Git\bin\sh.exe" --login -i
You can define your command in your ~/.profile
.
You can see a full example in "Windows shortcut to run git bash script":
On the other hand, if you want to run a script and get your shell back, you should :
- Open the shell as is
- Edit or create
~/.profile
(tryvi ~/.profile
)- Add this line :
~/test.sh
(adjust the path if needed)
In test.sh
, you can add any command you want, like node server.js
(or you could add them directly in the .profile
)