Is there a keyboard shortcut for Git Sync?

Viewed 421

Is there a shortcut for VSCode to synchronise changes to my remote repository right after a commit? I am working on MacOS if it can help.

I simply want to replace a click on the blue button in the following picture by a keyboard shortcut: enter image description here

If not present by default, how can I add one?

2 Answers

It looks like this command is called git.sync under the keyboard shortcuts (no keybinding is assigned by default). You should be able to assign it a binding of your liking.

git sync

You can set it up so the sync is done automatically after a commit by going to this setting;

Git: Post Commit Command

and choose sync and then your commit button will look like this:

commit and sync button

assuming you have Git: Show Action Button enabled for the commit action.

Related