Is it Possible to Use WSL Git Instead of Installing Git for Windows to Avoid Duplication of Tools?
Coz I dont Installed On mY windows machine GIt, and other Dev Tools...
I prepare it to run inside WSL and just call an alias to perform same obligation...
@g0ld3lux Put any one of these four in your settings.json
// 64-bit cmd if available, otherwise 32-bit
"terminal.integrated.shell.windows": "C:\\Windows\\sysnative\\cmd.exe"
// 64-bit PowerShell if available, otherwise 32-bit
"terminal.integrated.shell.windows": "C:\\Windows\\sysnative\\WindowsPowerShell\\v1.0\\powershell.exe"
// Git Bash
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe"
// Bash on Ubuntu (on Windows)
"terminal.integrated.shell.windows": "C:\\Windows\\sysnative\\bash.exe"
You can use it with "terminal.integrated.shell.windows": "C:\\Windows\\sysnative\\bash.exe" as @rogersachan mentioned. Note there are a few issues currently with it, specifically https://github.com/Microsoft/vscode/issues/10163
Actually, it's NOT working. Not in the Creators Update, and with SSH keys - clicking on the sync icon gives an error.
I can git push from WSL in an integrated terminal, but that isn't proper integration.
I'm starting bash with the -l argument so that it can get the SSH environment variables (which is why SSH keychain works properly inside the integrated terminal), but since git isn't aware of the SSH socket it fails.
This loops back to an earlier issue (that I can't find right now) pertaining to Cygwin bash - we need a way to set environment variables for the git binary.
There are no plans for the git integration to use git hosted within a WSL bash session. /cc @joaomoreno
@rcarmo I can use it back here in the Anniversary Update, so I assume that a breaking change was made.
Using WSL Git isn't the problem, guys. The problem is getting it to use SSH keys properly - that's a key security feature for a lot of orgs (and no, the credential manager and HTTPS isn't a good enough workaround).
For that to work, we need the ability to set environment variables for running Git, like I've pointed out before...