How to add a custom Git command to your Visual Studio menu – 110

Following yesterday’s tip, you can also add a custom Git command as an external tool.

For example, my output window shows the output of `git log –oneline –graph –decorate`

output of git log

Go to Tools – External Tools and add a custom tool similar to the screenshot I have below, where Title = `git log`, Command = `git.ext`, Arguments = `log –oneline –decoreate –graph`. If you click the Right Arrow button to the right of Initial Directory, you can choose where the current directory is for git commands. I’m using Current Solution $(SolutionDir) which is an internal variable to Visual Studio.

git log

After you add it, you’ll see your command appear under Tools menu next to External Tools.

Tools - git log

2 thoughts on “How to add a custom Git command to your Visual Studio menu – 110

    1. You should be able to, Tools | Options | Environment | Keyboard, in the box “Show commands containing” type externalcommand, select the right one, set what key you want.

      Like

Leave a comment