启动后让Git Shell运行命令

时间:2017-01-18 18:39:42

标签: windows powershell cmd posh-git

你可以做到

start powershell -command ls

打开PowerShell并将其列入文件列表。我正在尝试用Git Shell做类似的事情。目前我有

%LOCALAPPDATA\GitHub\Github.appref-ms --open-shell -command ls

打开Git Shell,但没有做任何其他事情。以这种方式启动Git Shell后是否可以运行命令?

1 个答案:

答案 0 :(得分:0)

由于尚未得到解答,我将提供使用git-bash而非MS应用程序参考文件的替代解决方案。

start /b cmd /c "C:/Program Files/Git/git-bash.exe" /C/path/to/script.sh

请参阅此问题:Cant run shell script using Git Bash interface on Windows10