VSCode + Git – Step-by-Step

GitCommitAll

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:
Git

Now to setup your environment:

  1. Open the command prompt in the folder you want to add your project files
    GitClone
  2. Press enter and then your code will be cloned locally
    GitCloning
  3. 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:
    CodeProject
  4. Now go to Git tab
    GitTab
    Now change some file and save, and then it will appear in the Git tab as a change
    GitChange.png
  5. Now you can add a message and Commit All
    GitCommitAll
    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.
  6. Sync to the origin
    GitSync
    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.

 

 

Deixe uma resposta

Preencha os seus dados abaixo ou clique em um ícone para log in:

Logotipo do WordPress.com

Você está comentando utilizando sua conta WordPress.com. Sair / Alterar )

Imagem do Twitter

Você está comentando utilizando sua conta Twitter. Sair / Alterar )

Foto do Facebook

Você está comentando utilizando sua conta Facebook. Sair / Alterar )

Foto do Google+

Você está comentando utilizando sua conta Google+. Sair / Alterar )

Conectando a %s