Normally, we use the following command to stage(add files to the staging area) and commit:
git add . git commit -m 'message'git push origin master
But with vscode, things can be much simpler, without even a single line of code. Here are the steps:
- Open your local git repository in vscode.
2. When you made some changes to the repo folder, the ‘source control’ button on the left sidebar will show the change numbers.
3. Click the ‘source control’ button, then type in the commit message. Click the checkmark ✓ to commit the changes.
4. The last step! Click the ‘more information’ button, which looks like ‘…’, and then select ‘push’ in the dropdown menu.
5. Done!