Publish project on Github with VS code

Hello coders, In this blog We publish or deploy our project on Github using Visual Studio code. I think everyone knows very well, What was the Github. If you don’t know then it will be ok. Github provides us the hosting where we can manage our project source code. You can create the repository in which you can save your project source code. The repository will be Public or Private. In the public repository, any user can access your source code or Anyone contributes with you on that project. In a private repository, Only admin of the account can access that repository source code. Now Let’s see how can we publish our project on github.


Before starting to deploy, We have to fulfill all the requirements

1 . Account on Github

If you don’t have Github Account, then you have to first create a new account on Github. You can create account without a penny and You can access all the functionalities of github . Github offers you unlimited private repositories but restricts private repositories to 2,000 actions minutes per month. You can create account from here – Click here

2 . Install visual studio code

Visual studio code is a free Source code editor for everyone. If you don’t use visual studio code, then you have to try it. There are a number of features in VS Code. You can download from here – Click here

3 . Download Git

You have to download a Git software to connect Git repository with your project. Git provides you separate terminal for commands. You can download according to your operating system . You can download from here – Click here After downloading Install git on your system.

4 . Install Azure Repos Extension

You have to install Azure Repos Extension. This extension allows you to connect to Github. It allows you to monitor your builds and manage your pull requests and work items for your Git Source repositories.

Open Visual Studio Code → Press Ctrl + shift + X for open extensions marketplace → Type Azure Repos → Click on Install

Now all requirements are completed. Let’s Go on process.


1 . Create a New Repository

Let’s create a new repository on github. Login on your github account. Click on New

Provide any name of your repository. In description, You can leave it or you can provide some details of your repository. Select your repository type Public or Private. I will select Private. Mark a checkbox to create a readme file.

Click on Create Repository.

2 . Make Repository clone

In this step, We have to make a clone of the repository on your local system. For creating a clone, open git bash from start button.

After the opening of Git Bash terminal, You have to go inside that directory where you want to create your project or make a clone of the repository. You can check the process on the below image on how you can go to your project directory.

Copy the url of your github repository

For creating clone of repository you have to type this command.

git clone {Repository Url} 

If your github account not logged in your system then it will be show you below window for login on your account.

After providing credentials. Your repository clone created on your provided directory. You can check out your repository that exists on that directory. If you want to rename your repository folder name you can change it to anything.

3 . Commit & Push with VS Code

Open project on Visual Studio Code. Create a new file inside the project. I will create index.html. Put some code inside the index.html and then save the file.

For commit a file Click on Left side Source Control button then type a commit message and Click on Tick button.

After commit, You have to push your all commits on github. To do that, You have to click on the push button on the side you can see the number of commits will be push.

Congratulation Your first push on github successfully. Now you can check on github repository where you can find your index.html file.


Using Visual Studio Code and Git you can save your project and Check your collaborator’s work anytime.

Leave a Reply

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