Keyboard shortcuts for Git operations in VS 2019

Hello Devs,

Most of the developers have a good habit of synching their code before starting their work. 

Most of them do it by clicking on Team Explorer ->   Selecting Git Repository -> Sync. 

Visual Studio has keyboard shortcuts for almost every operation. 

There are shortcuts for Git operations as well which most of us don't know. 

We can assign a keyboard combination for each Git operations as well.

Let us see how we can assign a keyboard key for Git Pull operation.

Go to Tools -> Options -> Under Environment section select Keyboard. Below screen is displayed.

  

Against "Show commands containing" all commands available for Visual Studio are listed, to which you can assign a shortcut key. In the textbox, enter "Team.Git". All the git operations will be listed now. The following screen will be displayed.



As an example, we'll assign a keyboard shortcut for one of the Git operations. Select "Team.Git.Pull".
Keep cursor inside textbox against Press shortcut keys. Press any key combo on your keyboard. This will appear inside that textbox. Once this key combo appears in the textbox, click on the Assign button. 
 


Now you're done with assigning shortcut for one of the Git operations i.e. Pull. 
Going further you don't have to do multiple clicks to sync your code. 

Just press key combo assigned to that particular operations!

Happy Learning......

“Before software can be reusable it first has to be usable.” – Ralph Johnson













Comments

Post a Comment