I was also struggling with the same but finally got it fixed with thanks to the final bit of help needed from @Timothy G's answer, with the help of other posts here on stack as well.
Let me just post a step-by-step solution adding to the @Timothy G's answer below, JIC if you're still struggling with it and also for future visitors.
Note: I'm using VS Code Insiders build (Version: 1.64.0-insider(user setup)) on Windows, but should work for other builds as well.
Since you have already downloaded git bash, ignore the 1st step.
- Download git bash from the https://git-scm.com/download/win.
- Open VS Code ⟹ File ⟹ Preferences ⟹ Settings. (Ctrl + ,).
There will be a search bar on top.
- Search for
terminal.integrated.profiles.windows.
A result will come up that would look like this
Terminal › Integrated › Profiles: Windows
The Windows profiles to present when creating a new terminal via the terminal dropdown. Use the source property to automatically detect the shell's location. Or set the path property manually with an optional args.
Set an existing profile to null to hide the profile from the list, for example: "Ubuntu-20.04 (WSL)": null.
Edit in settings.json
- Click on
Edit in settings.json.
Then another window will pop up next to the Settings tab called settings.json
- Copy and paste this inside the
settings.json. Remember to set the “path” to your git bash.exe in the bin folder
You can remove the first two lines if you don't need it and do Ctrl + S to save the JSON settings.
{
"workbench.colorTheme": "Default Dark+",
"files.autoSave": "afterDelay",
"terminal.integrated.profiles.windows": {
"My Git Bash":{
"path": "I:\\Projects\\git\\bin\\bash.exe",
"icon": "terminal-bash"
}
},
"terminal.integrated.defaultProfile.windows": "My Git Bash",
}
- After adding the above, select the “Settings” tab again and search for
terminal.integrated.defaultProfile.windows
Then you'll be presented with a terminal feature like this with a drop-down.
Terminal › Integrated › Default Profile: Windows
The default profile used on Windows. This setting will currently be ignored if either terminal.integrated.shell.windows or terminal.integrated.shellArgs.windows are set.
- Under the drop-down, select the profile
My Git Bash then you're
all set.
- Then got to ⟹ View ⟹ Terminal. (Ctrl + `)
It should now show up with the bash terminal. If it doesn't, restart VSC and it'll work for sure.