开发者

Solution to adding a Git (TortoiseGit) toolbar to Visual Studio [closed]

Closed. This question is seeking recommendations for books, tools, software libraries, and more. It does not meet Stack Overflow guidelines guidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 7 years ago.

Improve this question 开发者_如何学运维

Anyone know how to create a toolbar in Visual Studio 2010 to use with Git (TortoiseGit)?

Thanks

SurfRat


Solution to adding a Git (TortoiseGit) toolbar to Visual Studio [closed]

I wanted a Git toolbar in Visual Studio and I found no solution to this so I thought I would share this with you.

I installed the Git Source Control Provider and got Git working (via TortoiseGit) with the right click context menu. This was tedious and rather ugly as all the TortoiseGit commands had the same icon.

I then added external tools to Visual Studio...

Solution to adding a Git (TortoiseGit) toolbar to Visual Studio [closed]

Solution to adding a Git (TortoiseGit) toolbar to Visual Studio [closed]

The external tool commands for TortoiseGit are as follows:

Title: Git Push
Command: C:\Program Files\TortoiseGit\bin\TortoiseProc.exe
Arguments: /path:"$(SolutionDir)" /command:push

Title: Git Commit
Command: C:\Program Files\TortoiseGit\bin\TortoiseProc.exe
Arguments: /path:"$(SolutionDir)" /command:Commit

Title: Git Sync
Command: C:\Program Files\TortoiseGit\bin\TortoiseProc.exe
Arguments: /path:"$(SolutionDir)" /command:Sync

Title: Git Revert
Command: C:\Program Files\TortoiseGit\bin\TortoiseProc.exe
Arguments: /path:"$(SolutionDir)" /command:Revert

Title: Git Log
Command: C:\Program Files\TortoiseGit\bin\TortoiseProc.exe
Arguments: /path:"$(SolutionDir)" /command:Log

Once the external commands were created I created my toolbar. Visual Studio 2010 out of the box will not allow you to have an image in your toolbar so I installed the Command Image Changing Extension.

Here are the icons I created

Solution to adding a Git (TortoiseGit) toolbar to Visual Studio [closed]

Solution to adding a Git (TortoiseGit) toolbar to Visual Studio [closed]

Solution to adding a Git (TortoiseGit) toolbar to Visual Studio [closed]

Solution to adding a Git (TortoiseGit) toolbar to Visual Studio [closed]

Solution to adding a Git (TortoiseGit) toolbar to Visual Studio [closed]

The end result is a toolbar with the commands (showing only icons) that I need.

Update for Visual Studio 2012

The commands have changed slightly and are as follows:

Title: Git Commit
Command: C:\Program Files\TortoiseGit\bin\TortoiseGitProc.exe
Arguments: /path:"$(SolutionDir)" /command:commit

Title: Git Push
Command: C:\Program Files\TortoiseGit\bin\TortoiseGitProc.exe
Arguments: /path:"$(SolutionDir)" /command:push

Title: Git Sync
Command: C:\Program Files\TortoiseGit\bin\TortoiseGitProc.exe
Arguments: /path:"$(SolutionDir)" /command:sync

Title: Git Compare
Command: C:\Program Files\TortoiseGit\bin\TortoiseGitProc.exe
Arguments:  /path:"$(ItemPath)" /command:diff

Title: Git Revert
Command: C:\Program Files\TortoiseGit\bin\TortoiseGitProc.exe
Arguments: /path:"$(SolutionDir)" /command:revert

Title: Git Log
Command: C:\Program Files\TortoiseGit\bin\TortoiseGitProc.exe
Arguments: /path:"$(SolutionDir)" /command:log
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜