4

I have Git Bash and WSL Bash installed. Currently bash command is associated to WSL Bash. Can I link it to Git bash instead?

Max
  • 165

1 Answers1

1

There may be cleaner solutions, but I was able to get around this by doing either of the following:

  1. Specify the absolute path to Git Bash's bash executable each time:
& "C:\Program Files\Git\usr\bin\bash.exe" -c "echo hello"
  1. Create a Powershell alias for Git Bash's bash executable and use that:
New-Alias -Name git-bash -Value "C:\Program Files\Git\usr\bin\bash.exe"
git-bash -c "echo hello"