I'm running windows 10 trying to get a git bash terminal set up but VSCode isn't detecting the installation of Git or something?
I was looking at how to set it up, by doing "select default shell" in the terminal window, then selecting Git Bash, but it's not an option for me. VSCode and Git have both been installed normally so I don't get why this is happening?
Do I need to reinstall both these applications? I would rather not...Any suggestions?
Show activity on this post. The solution is to uninstall git and reinstall it in the default location which is (C:\Program Files\Git). All the other hacks failed.
Second way Another way to select a default terminal is to open up a new terminal in VS Code. Next to the big plus sign, click on the dropdown and select “Select Default Profile“. From the dropdown select “Git Bash” and you're all set.
If your terminal is set to run as administrator only, and you are not launching VS Code as administrator, the terminal will not be able to open. You can either change the default terminal or edit the properties of the terminal exe to not run as administrator.
I recommend that you put something like the following in your VS Code settings file (using the appropriate path for your system).
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\git-cmd.exe",
"terminal.integrated.shellArgs.windows": [
"--command=usr/bin/bash.exe",
"-l",
"-i"
]
This is discussed at https://code.visualstudio.com/docs/editor/integrated-terminal#_windows.
You may also need to put something like this in your ~/.bash_profile
:
## make Backspace key and other things work in VS Code's Terminal emulator
export TERM=xterm
I've written about this and more at https://www.ii.com/git-bash-is-my-preferred-windows-shell/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With