I have Git Bash and WSL Bash installed. Currently bash command is associated to WSL Bash. Can I link it to Git bash instead?
Asked
Active
Viewed 1,690 times
1 Answers
1
There may be cleaner solutions, but I was able to get around this by doing either of the following:
- Specify the absolute path to Git Bash's
bashexecutable each time:
& "C:\Program Files\Git\usr\bin\bash.exe" -c "echo hello"
- Create a Powershell alias for Git Bash's
bashexecutable and use that:
New-Alias -Name git-bash -Value "C:\Program Files\Git\usr\bin\bash.exe"
git-bash -c "echo hello"
Nathan Raine
- 140