Configuring “GIT bash” on “Windows Terminal” App
Hello Everyone,
This is just a follow up guide after my first introductory post over “Terminal” app. So, If you are interested in checking it you can have a look here.
Note : Before you begin please note, this article was written during the initial release of Terminal App since then, it received many technical updates So the guide may differ a bit but rest all the steps remains the same! To keep the track of updates please refer this link
So, lets get back to the topic.
As, i had already mentioned in my previous post, adding a new configuration to the terminal app is just a matter of editing a JSON file.So just follow the below steps:
- Open the terminal app and head over to the drop-down icon in the right top corner and click on settings.
2. It will open a file Settings.json (earlier profiles.json) file in your default editor and it looks similar to one below.
(Note : The global key from screenshot is now deprecated.)
As you can see, there are nifty of options you can play with. for now, lets focus on what we want to achieve.
3. Scroll down the file and check for the key that says “profiles”
copy the first set of JSON and paste it at the end of last set. it should be similar to this,
{
“acrylicOpacity”: 0.5,
“background”: “#012456”,
“closeOnExit”: true,
“colorScheme”: “Campbell”,
“commandline”: “powershell.exe”,
“cursorColor”: “#FFFFFF”,
“cursorShape”: “bar”,
“fontFace”: “Consolas”,
“fontSize”: 10,
“guid”: “{859342f7–0677–4d6b-ad46–44a5ea56e81c}”,
“historySize”: 9001,
“icon”: “ms-appx:///ProfileIcons/{859342f7–0677–4d6b-ad46–44a5ea56e81c}.png”,
“name”: “Windows PowerShell”,
“padding”: “0, 0, 0, 0”,
“snapOnInput”: true,
“startingDirectory”: “%USERPROFILE%”,
“useAcrylic”: false
},
The only thing’s you will need to update are ( Other are just visual appearance related feel free to use your imagination.)
- guid
- commandline
- name
- icon (Optional)
Guid : GUID (or UUID) is an acronym for ‘Globally Unique Identifier’ (or ‘Universally Unique Identifier’). It is a 128-bit integer number used to identify resources. So, to just get one you can simply head over to any GUID generator tool like https://www.guidgenerator.com/online-guid-generator.aspx or simply open the windows powershell and type :
[guid]::NewGuid()
and the guid is generated paste in front of the key that says guid.
commandLine : It is the path to the executable we want to open. in this case bash shell so, on windows its usually :“C:\\Program Files\\Git\\bin\\bash.exe
”
(Note : Please check in your case it might be different and don’t use git-bash.exe it will open the shell in new separate window!)
name : name you want terminal to show in drop-down against your app. lets call it “Git bash”.
icon : an optional icon you want to set. ( not setting this will show an empty space). just use the default bash icon located at:
C:\\Program Files\\Git\\mingw64\\share\\git\\git-for-windows.ico
the final JSON should look like below:
{
“acrylicOpacity”: 0.75,
“closeOnExit”: true,
“colorScheme”: “Campbell”,
“commandline”: “C:\\Program Files\\Git\\bin\\bash.exe”,
“cursorColor”: “#FFFFFF”,
“cursorShape”: “bar”,
“fontFace”: “Consolas”,
“fontSize”: 10,
“guid”: “{3fe01e42–086e-4c95-ba57–989a39312e0c}”,
“historySize”: 9001,
“icon”: “C:\\Program Files\\Git\\mingw64\\share\\git\\git-for-windows.ico”,
“name”: “Git Bash”,
“padding”: “0, 0, 0, 0”,
“snapOnInput”: true,
“startingDirectory”: “%USERPROFILE%”,
“useAcrylic”: true
}
Just paste the above JSON after the last key under profile key and save the file . you will see the app automatically reflect the changes on the fly.
and
Congratulations you have successfully added “Git Bash” to your terminal app.
Happy Hacking!