category: [ VSTS / TFS ] tags: [ git ] [ Visual Studio ]
created: 18 Mar 2019 @ 21:21 modified: 19 Mar 2019 @ 15:35
So something that you've probably noticed when using dev tools in the web and Visual Studio Code is that you can hit ctrl + enter and with this you may have noticed that in Visual Studio you can't do that. Below you'll see how you can add this to your IDE.
Adding keyboard shortcuts for Team Explorer
First off open Visual Studio and press ctrl + Q to jump to the search VS textbox and then type keyboard and then select Change hotkeys and keyboard shortcuts.
This will open the Options dialog to the Keyboard section under environment.
- First off type team.git.commit in the show commands containing field
- Select Team.Git.Commit
- Select Team Explorer from the Use new shortcut in
- In the Press shortcut keys textbox press ctrl + enter
- Click Assign
You can repeat this if you want for Commit and Sync and assign the shortcut ctrl + shift + enter.
Having this shortcut can help improve your flow a lot. If you want to 'switch' to the commit screen you could make the Use new shortcut in drop list as Global and it will switch to changes (because there is no comment, if there is a comment it's going to just commit so beware of that).
EDIT: To go to Commit changes window from anywhere you can bind Team.Git.GoToGitChanges as Global and that will jump to the window .
Gordon Beeming works at Derivco in the sunny city of Durban, South Africa. When he's not hacking away at a keyboard in Visual Studio he'll generally be relaxing with his family or hitting the black top getting in some mileage. He is a Visual Studio ALM Ranger and Visual Studio ALM MVP.