If you want to automatically push to a GitHub repository after commit, Gitlens extension in VS Code has a setting to make this possible. You just change the git.postCommitCommand setting and then when you commit and it pushes simultaneously.
- Open GitLens Extension Settings.
- Search for
- click on the dropdown menu and change
That’s it. Now every time you commit to your Github repository, it is pushed automatically.