Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change default button from "Commit" to "Commit and Push" in Source Control view of VSCode

As mentioned in the title, Is it possible to change the action of that BIG Button that says Commit to Commit and Push? That way, I need not do one additional action i.e. push every time I make a commit.

enter image description here

like image 609
GorvGoyl Avatar asked Aug 31 '25 15:08

GorvGoyl


1 Answers

The Git extension allows to set a Post Commit command. Which changes the wanted big button to 'Commit & Push' :)

Navigate there and set it to 'push':

Settings -> Extension -> Git -> Post Commit Command

Settings are located under: CTRL+SHIFT-P, Preferences: Open User Settings

Or change it in you settings.json:

"git.postCommitCommand": "push"

PostCommitCommand enter image description here

like image 131
Julian Avatar answered Sep 08 '25 15:09

Julian