如何将 bash 命令关联到 Git Bash 而不是 WSL Bash?

How can I associate bash command to Git Bash instead of WSL Bash?

我安装了 Git Bash 和 WSL Bash。当前 bash 命令与 WSL Bash 关联。我可以 link 改为 Git bash 吗?

我自己研究了一下

在 PowerShell 中,您可以将 bash 命令关联到 Git Bash 和

Set-Alias -Name bash -Value "C:\Program Files\Git\usr\bin\bash.exe"

但它只会对您拥有 运行 命令的 PowerShell 会话有效。