Equivalent command(s) to stage all changes and commit to master in VS Code source control

Viewed 16

I want to make an npm script to push all my code to the master branch of a GitHub repository and deploy to my hosting provider. The command to deploy is working but the push to GitHub is not.

It is as follows:

git push origin master:master

I want the command to be the equivalent of navigating to Source Control in VS Code, staging all changes, and clicking "Commit & Sync." What command do I use for this?

1 Answers

I was able to get it to work using:

git add -A
&& git commit -m messageHere
&& git pull
&& git push https://github.com/github-username/repositoryName
Related