Answer a question

Unfortunately we can't install Git nor Visual Studio Code. Hence using "portable" versions of both. Looking for a smooth "bash" integration within VS-code in Windows 10

we have tried various combinations in the git.path and have added settings in user & workspace of VS-Code (as below)

{
    "workbench.colorTheme": "Default Dark+",
    "git.ignoreMissingGitWarning": true,
    "git.enabled": true,
    "git.path": "C:\\installables\\PortableGit\\mingw64\\bin\\git.exe",
    "terminal.integrated.shell.windows": "C:\\installables\\PortableGit\\bin\\bash.exe"
}

The Git portable have git.exe in Various places as below.

./PortableGit/bin/git.exe
./PortableGit/cmd/git.exe
./PortableGit/mingw64/bin/git.exe
./PortableGit/mingw64/libexec/git-core/git.exe
./PortableGit/git-bash.exe
./PortableGit/git-cmd.exe
./PortableGit/mingw64/share/git/git-wrapper.exe

Not exactly sure, which of the "git*.exe" is required so the portable VS-code can integrate into its shell. Anyone had similar setup/settings?

Answers

./PortableGit/bin/git.exe is enough. I use it in combination of a portable VSCode without issue.

The other approach is to set the path correctly, then launch VSCode.

set GH=C:\path\to\git
set PATH=%GH%\bin;%GH%\usr\bin;%GH%\mingw64\bin;%GH%\mingw64\libexec\git-core;%PATH%
Logo

开发云社区提供前沿行业资讯和优质的学习知识,同时提供优质稳定、价格优惠的云主机、数据库、网络、云储存等云服务产品

更多推荐