I have a windows version of Git Bash, and I want to use it with my Visual Studio Projects. What I want is a way of tweaking some setting so that one click can get Bash opened with the directory on the current visual studio project.
It would be great if there's a way to set up short cut in Git Bash for directories, so that one command can get me to a preset directory.
By this way you can access Git Bash with simply typing bash in every terminal including the integrated terminal of Visual Studio Code.
The solution is to uninstall git and reinstall it in the default location which is (C:\Program Files\Git). All the other hacks failed. Show activity on this post. By configuring profile as bash in the above format it worked finally!!!
Launch Git Bash from Visual Studio
In Visual Studio Menu Bar: Tools -> External Tools -> Add New
Configuration:
Name: Git Bash
Command: c:\Program Files (x86)\git\bin\sh.exe
Args: --login -i
Initial Dir : $(SolutionDir)
Visual Studio 2019 after v16.6 comes with an integrated terminal similar to the one in Visual Studio Code but its configuration dialog is really buggy as of now. It also doesn't come with a preconfigured git bash, so in order to make it work, you'll have to work around the bugs and create the configuration.
c:\program files\git\bin\bash.exe
, as Arguments use --login -i
. The shell will be started in your solution's base directory.You should now be able to use bash in the integrated terminal via the default shortcut Ctrl + ` or via View -> Terminal in the menu.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With