Git Source Control Provider hotkeys

时间秒杀一切 提交于 2019-12-11 12:12:30

问题


I'm using the Git Source Control Provider extension for Visual Studio 2010, and I'd like to set a hotkey for Commit, but I can't make it work. I'd like to define a keyboard shortcut for whatever command is run by right-clicking anywhere in my solution, selecting "Git->Commit" (the one with the cow icon, not the one provided by TortoiseGit).

I've set a hotkey for GitPlugin.Connect.GitExtensionsCommit (Ctrl+G, Ctrl+C), to be used globally (yes, I had to disable some other hotkey settings that used Ctrl+G), but whenever I use it I get an error message saying that the command is not currently available.

How do I set hotkeys for the Git Source Control Provider?


回答1:


After playing around with this, I was able to get it working.

I configured Ctrl+\, Ctrl+K to be the shortcut (but you can set your own as long as there are no conflicts).

After that, if you select any project/file node and hit the shortcut, it'll trigger the commit.

The catch here is that you have to select a project or file in solution explorer which makes sense because otherwise, the provider doesn't know what to commit.



来源:https://stackoverflow.com/questions/6676294/git-source-control-provider-hotkeys

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!