Could paste here the error you’re getting from VSCode console log?
Also, which OS are you working on? How did you install Git?
VSCode requires the Git binary to be present on the System PATH, otherwise you can change its configuration and provide VSCode the absolute path to Git’s binary.
Here’s an example tutorial on how to setup VSCode + Git under Windows OS:
If everything is already setup as required, but you’re still failing to push to your repository, there might be a problem with Git credentials, which means Git is failing to login into GitHub. Beware that recently GitHub has changed the account security settings, so you’ll need to setup an OAuth code for Git credentials — i.e. instead of the passwords, you’ll need to use the OAuth key (string).