Is it possible to automatically git push when I make a commit in Visual Studio 2022? I see the Commit All button by default, and I don't want to have to click the arrow beside it every time that I want to commit & push at the same time, which is the action I always do when I commit.
Visual Studio Code has a nice setting for this, but I didn't see a similar settings to configure it in Visual Studio.
You can assign a keyboard shortcut to perform the commit and push instead of just commit.
Go to Tools → Options → Environment → Keyboard and optionally search the word "commit".  Find the Team.Git.CommitAndPush shortcut and set it to what you wish.  In this case, I remapped Team.Git.Commit (normally Ctrl + Enter) to Team.Git.CommitAndPush. When assigning the shortcut, be sure to select "Git" for the "use new shortcut in" drop down.

After changing this, you can see that the drop down option now has the shortcut too:

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With