2021-01-29

Adding Git-Bash to the new Windows Terminal

markdown 在 Terminal 按下 `ctrl` + `,`,會開啟 `settings.json` ``` { "$schema": "https://aka.ms/terminal-profiles-schema", "defaultProfile": "{00000000-0000-0000-ba54-000000000001}", "profiles": { "defaults": { // Put settings here that you want to apply to all profiles }, "list": [ // put one of the configuration below right here ] } } ``` 在 list 的區段中加入,依據正確git安裝路徑取消`commandline`和`icon`的註解 ``` { "guid": "{00000000-0000-0000-ba54-000000000002}", //"commandline": "%PROGRAMFILES%/git/usr/bin/bash.exe -i -l", //"commandline": "%USERPROFILE%/AppData/Local/Programs/Git/git-bash.exe -l -i", "commandline": "%USERPROFILE%/AppData/Local/Programs/Git/bin/sh.exe --login", //"commandline": "%USERPROFILE%/AppData/Local/Programs/Git/bin/bash.exe -l -i", //"commandline": "%USERPROFILE%/scoop/apps/git/current/usr/bin/bash.exe -l -i", //"icon": "%PROGRAMFILES%/Git/mingw64/share/git/git-for-windows.ico", "icon": "%USERPROFILE%/AppData/Local/Programs/Git/mingw64/share/git/git-for-windows.ico", // "icon": "%USERPROFILE%/apps/git/current/usr/share/git/git-for-windows.ico", "name": "Bash", "startingDirectory": "%USERPROFILE%" } ``` # Reference # [Adding Git-Bash to the new Windows Terminal](https://stackoverflow.com/questions/56839307/adding-git-bash-to-the-new-windows-terminal)

adsense