Home 0P3N Blog MS Visual Studio Code: Your Guide to Git
Ready to Start Your Career?
Create Free Account
By: Jawady Muhammad Habib
November 8, 2017

MS Visual Studio Code: Your Guide to Git

By: Jawady Muhammad Habib
November 8, 2017
By: Jawady Muhammad Habib
November 8, 2017
Hello, guys!This is Muhammad Habib Jawady. Today I will demonstrate how to use MS Visual Studio Code in order to properly work with Git. This will be a hands-on tutorial that I hope you find useful. The number of users of ‘Code’ has grown dramatically throughout the year, and the need for a full tutorial on how to use it has become a matter of urgency to help people master the enormous number of features it contains.For full documentation of VS Code, I recommend visiting the official documentation site here: Docs. I will skip introducing this Code editor and assume that you have prior basic knowledge with code editors and IDEs. For additional information on the matter, you can view this guide and gain a basic awareness of git concepts.

GIT CLONE:

First, we will be creating our demo project, the repository name is  ‘demo-for-vs’ and initialize it with a README markdown, aka README.mdThen, we will copy the cloning .git URL located at the top right corner and open the MS VS Code menu to choose the option ‘clone git repository’ from the welcome page and startup window and paste that URL.We hit enter and fill where we want our repository to be cloned and then we choose ‘Open repository’ from the next pop up.

Making/Staging changes:

Now let’s make some changes to our local version. For this, I will change the size of our title in the README file and add a new file ‘index.html’.If you click on the ‘Source control’ tab located on the left (under the search logo), you should be able to see this :and you can notice that on the left, there is the original version, and on the right your local version.Now we will have to stage our changes by hitting the ‘+’ icon on the right of the files’ names.

Git commit:

In order to make a commit, you will have to hit that ✔ button on top of the files as shown below :

Git push:

In order to apply changes in the original repository, we will use run the regular push command from the terminal which is integrated into Code.For this purpose, we first go to ‘view’ >> ‘Integrated Terminal’ :Then we run: git push origin master—-> Success ^^I hope you learned something new today … For any inquiry, feel free to submit a comment.
Request Demo

Build your Cybersecurity or IT Career

Accelerate in your role, earn new certifications, and develop cutting-edge skills using the fastest growing catalog in the industry