This is my quick, 1 minute, method to add ‘Git for Windows’ bashto Windows Terminal. But you can use the same process for any other command line.
- Either use the shortcut CTRL+, or the menu to open the settings.json
- This will open the settings.json file in you default editor.
- Now generate a new GUID by either
- go to https://www.guidgenerator.com/online-guid-generator.aspx or
- Enter [guid]::NewGuid() into the PowerShell terminal window
- Add the following json to the bottom of the “Profile”:”List” section
,
{
"guid": "{REPLACE THE GUID HERE WITH YOUR ONE}",
"hidden": false,
"name": "Git bash",
"icon": "C:\\Program Files\\Git\\mingw64\\share\\git\\git-for-windows.ico",
"commandline": "C:\\Program Files\\Git\\bin\\bash.exe",
"colorScheme": "One Half Dark",
"startingDirectory": "%USERPROFILE%"
}
- Remember to replace the GUID with the one you created earlier.
- Save the file and you should now see the option in the drop down.
If you want this to be your default terminal, then just add the GUID to the “defaultProfile” setting in the json file and save.
I used a simple colour scheme to distinguish this terminal from the other. I also changed the PowerShell one by adding
"colorScheme": "Campbell Powershell"
to that profile to bring back the good ol’ blue background 😉
This is just the tip of the iceberg. You can customise Windows Terminal to your hearts delight.
For more details see the full Windows Terminal docs here https://docs.microsoft.com/en-gb/windows/terminal/