2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【Windows Terminal】Git Bashを追加

Last updated at Posted at 2022-04-25

環境

  • Microsoft Windows 10.0.22000.613(21H2)
  • Windows Terminal 1.12.10983.0

手順

設定ファイルを開く

Ctrl+, で設定を開く。左下の設定マークをクリックすると settings.json が開く。
image.png

list 内に Git Bash の設定を追加する。(以下の例はGit Bash が C:\\Program Files\\Git にインストールされている場合)

Git Bash の設定
{
    "guid": "{c41fc47f-3f5f-5414-a05d-cf0341702683}",
    "name": "Git Bash",
    "commandline": "C:\\Program Files\\Git\\bin\\bash.exe -li",
    "icon": "C:\\Program Files\\Git\\mingw64\\share\\git\\git-for-windows.ico",
    "startingDirectory": "%USERPROFILE%"
}

guid

一意識別子 - Windows ターミナル

次のいずれかの方法で guid を生成する。{} をつけることを忘れずに。

1. コマンドから

PowerShell上で New-GUID または [guid]::NewGuid() を実行

出力
Guid
----
7b5858bb-42a3-4b8c-8df2-b20446d8ee29
2. ジェネレーターから

image.png

エラーの原因

, を忘れていないか確認

参考

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?