Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HOw to Use Your WSL Git inside VS Code .... #16427

Closed
g0ld3lux opened this issue Dec 3, 2016 · 6 comments
Closed

HOw to Use Your WSL Git inside VS Code .... #16427

g0ld3lux opened this issue Dec 3, 2016 · 6 comments
Labels
*question Issue represents a question, should be posted to StackOverflow (VS Code)

Comments

@g0ld3lux
Copy link

g0ld3lux commented Dec 3, 2016

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...

@ghost
Copy link

ghost commented Dec 3, 2016

@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"

@Tyriar
Copy link
Member

Tyriar commented Dec 4, 2016

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 #10163

@Tyriar Tyriar closed this as completed Dec 4, 2016
@Tyriar Tyriar added the *question Issue represents a question, should be posted to StackOverflow (VS Code) label Dec 4, 2016
@rcarmo
Copy link

rcarmo commented Apr 4, 2017

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.

@Tyriar
Copy link
Member

Tyriar commented Apr 4, 2017

There are no plans for the git integration to use git hosted within a WSL bash session. /cc @joaomoreno

@ghost
Copy link

ghost commented Apr 4, 2017

@rcarmo I can use it back here in the Anniversary Update, so I assume that a breaking change was made.

@rcarmo
Copy link

rcarmo commented Apr 5, 2017 via email

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*question Issue represents a question, should be posted to StackOverflow (VS Code)
Projects
None yet
Development

No branches or pull requests

3 participants