Angular 2 News tutorial in Visual Studio Code part 2

In part 2 we will integrate Git and GitHub in our app. Visual Studio Code has integrated Git support. This makes it an excellent choice to manage our code commits while we develop. If our workspace isn’t under Git source control, we can easily create a Git repository with the Initialize git repository command.


Git tracks the added/changed files and as we can see there are thousands of them!We should add a .gitignore file in order to keep in track only the important files.
So add to the root folder a .gitignore file with this content


Now we have only a dozen of files!

Write a comment like “Initialize” and then hit Ctrl+Enter and the initialization will take place. We have created a local git repo. We also want to push our code to GitHub.Provided that we already have a GitHub account, we create a new repository


Let’s name our repository Angular2RCWorldNews.When our repo is ready GitHub is giving us instructions on how we can make a remote push.


We copy the instructions to the clipboard and then we paste them to the windows command prompt.Keep in mind that our path is the folder of the application.
Now a remote git push is taking place and when it finishes we can see our code in GitHub.


Giorgos Basagiannis

I am a full stack engineer with broad technical skill set. I am passionate about developing high quality software that is scalable and easy to maintain. My main areas of interest include Microsoft Web & Cloud Technologies,JavaScript based frameworks,SharePoint and Office 365.

Leave a Reply

Your email address will not be published. Required fields are marked *