How to upload a local project to Github from Visual Studio Code

Many developers are inclined to upload new or existing projects to the Github platform . For this reason, we recommend you read this article where you will learn How to upload a local project to Github from Visual Studio Code easily?

What is Github?

Github is a platform for hosting code through repositories. It is known as “Social coding” because it allows the development of team projects. Github has a version controller or “Git” through which you can upload your code in order to keep it organized and available to access later or make changes when necessary.

What is Github for?

Github is used to create multiple versions of the code and save them in repositories. This way, you can use your code, improve it, and have others access it. This code must be structured like a common website and requires initialization of a code directory such as a Git repository. 

Therefore, Github is very useful for creating a local copy of your codes and the use of new functionalities without having to modify the functional version that is not the final one because you can add improvements.

How does Github work?

Github works with a version control system or “Git” that must be installed on the computer. In addition, it is necessary to create a user account with a name and password that identifies the developer. Subsequently, he must enter the official website of the platform and start creating repositories to upload his projects there.

How to upload a local project to Github from Visual Studio Code easily?

The Microsoft company integrated the Github platform into its development environment so that developers can upload their projects from Visual Studio without any inconvenience. Next, we explain the procedure to achieve it.

Connect to the “Github” platform

The first step is to connect to Github from Visual Studio. To do this, you must go to the “Team Explorer” section. Then, click on “Connection Manager” and select the option “Sign in”.

Enter your Github username and password

In “Sign in” enter your username and password to access Github . If you do not have this data, you must create an account from the official Github page: https://github.com

Create a repository for the source code

Once you have logged into Github, you need to create a repository on Github Desktop . For this, select the “Create” option. Later, you must enter some data to create the repository and the local path for the workspace. Finally, press the “Create” button.

Add your project

When you press the ” Create ” button , you will see the repository that you just created. The platform will indicate that you can create a project in the repository. Instead, add your own local project by double-clicking on the repository.

Later, copy the solution from the project to the path that you indicated as the workspace. With the source code added to the path, press the “Changes” button. You will see a list that includes all the files that will be included in the repository. Add a description about the changes and click “Commit All.” It is important to mention that you can also upload a Java project created in Netbeans or from Eclipse.

Synchronize the changes

Having pressed “Commit All” the changes will be stored in the equipment. However, it is necessary to synchronize with Github to upload the files to this platform. To do this, click on “Sync” when the “Commit” confirmation message appears.

A list will appear with the changes to be made. Press the ” Push ” button to start the process. Then, you will see a message confirming the publication of the project in the repository.

Verify that you have uploaded the project to Github

Finally, go to the official Github website and check if the project has been uploaded by accessing your account. After the previous steps you should have the project correctly uploaded to the platform.

 

Leave a Comment