Install Git from https://git-scm.com/download/win
Open Visual Studio Code and press and hold Ctrl + ` to open the terminal.

Open the command palette using Ctrl + Shift + P.
Type - Select Default Profile
Select Git Bash from the options
Click on the + icon in the terminal window
The new terminal now will be a Git Bash terminal. Give it a few seconds to load Git Bash

You can now toggle between the different terminals as well from the dropdown in terminal.

Install Git from https://git-scm.com/download/win
Open Visual Studio Code and press and hold Ctrl + ` to open the terminal.

Open the command palette using Ctrl + Shift + P.
Type - Select Default Profile
Select Git Bash from the options
Click on the + icon in the terminal window
The new terminal now will be a Git Bash terminal. Give it a few seconds to load Git Bash

You can now toggle between the different terminals as well from the dropdown in terminal.

You no longer need to type in bash.exe path manually. This answer is deprecated. Now you can switch to bash directly, if you have git installed in the default path. If you installed git to a different path you need to use the below solution.
Install Git from https://git-scm.com/download/win.
Then open Visual Studio Code and open the command palette using Ctrl + Shift + P. Then type "open user setting", and then select "Open User Settings" from the drop down menu.

Then this tab will open up with default settings on left and your settings on the right:

Now copy this line of code to your own settings page (the pane on the right hand side) and save -
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe"
Note: "C:\\Program Files\Git\bin\bash.exe" is the path where the bash.exe file is located from the Git installation. If you are using the Windows Subsystem for Linux (WSL) Bash shell, the path would be "C:\Windows\System32\bash.exe"
Now press Ctrl + ` to open up the terminal from Visual Studio Code. And you will have Bash -

Making git bash terminal available in vs code 👌
[Q] How to run bash commands in vscode terminal?
Bash don't work inside VS Code, cannot type 'Shell integration failed to activate'
Git and VSCode: Setting up the git bash in the terminal without git in System Variables
Videos
I finally found a plugin which makes git bash availablein vsvode terminal on Windows, i always found it a bit frustrating switching between vs code and git bash "external window" when interfering with git. The reason why im so thrilled about this is now I have auto complete avalible directly in vs code :D I will be alt + tabbing way less. I just wanted to share this since i figured some of you guts also would benefit from this!
Thanks to our dude McCarter
https://marketplace.visualstudio.com/items?itemName=McCarter.start-git-bash&ssr=false#overview
It seems adding "terminal.external.windowsExec": "C:\\Program Files\\Git\\bin\\bash.exe" to Settings is the old way and doesn't work as expected.
Delete all lines related to bash from Settings JSON (check User, Workspace and Folder Settings to be sure) and save the file.
Then just open Command Palette (Ctrl + Shift + P) and type in
Select Default Shell
and choose bash from there.
Now all you have to do is restart VS Code and terminal will be running as expected.
For shells that aren't in your %PATH%, see the other answers.
See the complete Visual Studio Code shell reference.
I've had this problem before, it is very simple to fix.
The issue is that you are opening a program located at:
C:\Program Files\Git\git-bash.exe
Which cannot run within VS Code. To fix it, open your settings in VS Code:
CTRL + ,
Use the search bar to filter for the word:
integrated
Look for the following setting:
Terminal>Integrated>Windows
Update the field to be:
C:\Program Files\Git\bin\bash.exe
Change your external field to:
C:\WINDOWS\System32\cmd.exe
I hope that works for you.
I'm on a Windows machine and cannot get my vscode terminal to run bash commands. Really all I want is to run a .txt or .sh that has presets for my argparser in Python, but doing things like sh my_file.sh or my_file.sh or bash my_file.sh all have not worked. I've googled about it but none of the answers have been successful. I was reading that I might need to install bash to my anaconda environment? Or alternatively download some thing that lets the Windows terminal become a Ubuntu terminal?
What's the best/easiest way to either be able to run bash commands in vscode terminal, or alternatively if there is a way to accomplish this without using bash (I think I could technical copy and paste my entire argparser and all the added args and just have different files with different defaults hardcoded...).