There are numerous times when the Visual Studio built-in Git operations are not enough to handle the task you need to solve. Often the best way to use git is from the Git Bash. That is why you should add it to the Visual Studio top menu bar. This way the git bash will open in the correct place ready to execute your commands.
The following steps will guide you to achieve this:
From the menu bar select Tools -> External Tools…
Add a new External Tool. Give the path to your local Git bash installation and select $(SolutionDir) as the Initial directory. This way it will always open up in the currently opened solution directory.
Then go to View -> Toolbars -> Customize…
Once the window opened select the Commands tab and click Add Command…
Choose from the Tool the new External Command, the number may depend on the defined external commands.
After adding it to the Preview. Select it and move it down to the end.
That’s it! You should now have the option to open git bash directly from Visual Studio.
Comments