Visual Studio Code has a setting to push or sync on commit.
- Go to the VS Code Settings menu (Gear on the bottom left > Settings)
- Go to Settings > Git and look for Post Commit Command
- One of the options is push (the other is sync). Choose that.
Visual Studio Code has a setting to push or sync on commit.