I would really recommend using the CLI of git instead of vscode, at least at the begining, but if you insist on using vscode for that, this easily done with this explanation:
- press on the version control button(#1 in the picture)
- hover the files you want to add and press the '+' button (#2)
- When you are done adding, commit your work pressing on the 'v'(#3) and then add a message on the text box(#4) and press enter.
This will create a new commit to save changes locally.
To save the code in a remote repository you need to push your commits. You can do it using the the push command. Again, I will recommend using CLI but if you insist you can use vscode for that like this(press the 3 dots (...) button to enter to the below menu):
P.s. Make sure your repository saves the proper remote destination.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…