向 Visual Studio 添加 Git (TortoiseGit) 工具栏的解决方案 [英] Solution to adding a Git (TortoiseGit) toolbar to Visual Studio

查看:125
本文介绍了向 Visual Studio 添加 Git (TortoiseGit) 工具栏的解决方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道如何在 Visual Studio 2010 中创建工具栏以与 Git (TortoiseGit) 一起使用吗?

谢谢

冲浪鼠

解决方案

我想要 Visual Studio 中的 Git 工具栏,但我没有找到解决方案,所以我想与您分享.

我安装了 .

这是我创建的图标

最终结果是一个带有我需要的命令(仅显示图标)的工具栏.

Visual Studio 2012 更新

命令略有变化,如下:

标题:Git Commit命令:C:\Program Files\TortoiseGit\bin\TortoiseGitProc.exe参数:/path:"$(SolutionDir)"/command:commit标题: Git 推送命令:C:\Program Files\TortoiseGit\bin\TortoiseGitProc.exe参数:/path:"$(SolutionDir)"/command:push标题:Git 同步命令:C:\Program Files\TortoiseGit\bin\TortoiseGitProc.exe参数:/path:"$(SolutionDir)"/command:sync标题:Git 比较命令:C:\Program Files\TortoiseGit\bin\TortoiseGitProc.exe参数:/path:"$(ItemPath)"/command:diff标题:Git 还原命令:C:\Program Files\TortoiseGit\bin\TortoiseGitProc.exe参数:/path:"$(SolutionDir)"/command:revert标题:Git 日志命令:C:\Program Files\TortoiseGit\bin\TortoiseGitProc.exe参数:/path:"$(SolutionDir)"/command:log

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

Thanks

SurfRat

解决方案

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...

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

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

这篇关于向 Visual Studio 添加 Git (TortoiseGit) 工具栏的解决方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆