Creating a Repository on GitHub through Visual Studio Code

I am a recent graduate at the beginning of my software development career. I enjoy documenting my learnings through my blogs
I added my first GitHub repository using the CLI, but this time I tried adding a repository through VS code. This method was surprisingly easy and for newbies like me these are the steps.
Step 1:
Open your code in visual studio code, go to the source control.

To create a new repository, if you don't already have one created, select "Initialize Repository". However, if you already have a reposiory on GitHub you can choose the second option "Publish to GitHub".
For this blog I will be focusing on the "Initialize Repository" option.
Step 2:
The next window you will see is the "Commit" window. Here it will show you all the file you have not commited yet, and you can choose a select few or commit all. You should also input a message for your commit.


As I have only one to commit I just continued and was issued this message, I selected yes but if you intend to always commit all your changes select always.
Step 3:
You will be asked to provide access to your GitHub profile for VS code, this will bring you to a window for you to authorize this access.

A pop up for GitHub login will then appear and you must log in for VS code verification.


Step 4:
You will next see a window to "Publish Branch", this pushes your code to GitHub and

I got a notification to say this was successfully published.

This is a more straightforward method, if you don't like using the CLI this is the way to go.




