Add Git Bash To Visual Studio Top Bar

Add Git Bash To Visual Studio Top Bar

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 Git Bash To Visual Studio Top Bar - Step 1

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.

Add Git Bash To Visual Studio Top Bar - Step 2

Then go to View -> Toolbars -> Customize…

Add Git Bash To Visual Studio Top Bar - Step 3

Once the window opened select the Commands tab and click Add Command…

Add Git Bash To Visual Studio Top Bar - Step 4

Choose from the Tool the new External Command, the number may depend on the defined external commands.

Add Git Bash To Visual Studio Top Bar - Step 5

After adding it to the Preview. Select it and move it down to the end.

Add Git Bash To Visual Studio Top Bar - Step 6

That’s it! You should now have the option to open git bash directly from Visual Studio.

Comments