Hey guys, I’m amazed with VSCode, it’s simple and powerful!
My idea with this post is to make it more simplified, and clear for the ones that are just starting with code.
You must have in your machine VSCode and Git installed!
Also you must have a repository ready to be used, in my case I’m using VSTS:
Now to setup your environment:
- Open the command prompt in the folder you want to add your project files
- Press enter and then your code will be cloned locally
- Now to open in your VSCode just typing “code .” in the project’s folder
(This is the folder where are your project files)
Then you will be able to see the project:
- Now go to Git tab
Now change some file and save, and then it will appear in the Git tab as a change
- Now you can add a message and Commit All
At this point you committed your code to your local repository, then if you and to send it to the remote Git, you must sync your code.
- Sync to the origin
Once you press sync, it will execute a git pull and then a git push, that way it can ensure that you are integrating all changes locally and then sending all integrated code back to the server. Conflicts may appear, depending on the changes done pushed to the server previously, in that case VSCode will show for you the conflict and you may use its tool to fix the conflict.