Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git-Bash in Visual Studio Code from the D drive

I am trying to use Git Bash as a terminal in Visual Studio Code, however I am not able to find it in the terminal profiles. The option for Git Bash doesn't appear in the available terminals. I have installed Bash already. However I did it in the D drive. Is there a way to make git-bash available to choose as a terminal or even make it the default one from the D drive?

like image 494
Mark Avatar asked Nov 23 '25 20:11

Mark


1 Answers

You can create your own profile in the setting.json file and set the default terminal profile to it, like so (for Windows):

"terminal.integrated.profiles.windows": {
        "My Git Bash":{
            "path": "D:\\GitbashLocation\\git-bash.exe",
            "icon": "terminal-bash"
        }
},
"terminal.integrated.defaultProfile.windows": "My Git Bash",

Note that you can name your profile whatever you want. You may also need to restart Visual Studio Code after defining your profile so it detects it when you specify it in the terminal.integrated.defaultProfile.windows setting.

like image 183
Timothy G. Avatar answered Nov 25 '25 11:11

Timothy G.