Install Github Extension in Visual Studio 2015
In Visual Studio select Tools -> Extensions and Updates which open the window show in below. Download and install the extension, a reboot of Visual Studio may required.
Create GitHub repository and login to Github
You need to have a account to Github. Once created, use the credentials to login to your GitHub account.
Create a GitHub repository
Now create GitHub repository by selecting the Create button on the Team Explorer tab in Visual Studio
Enter the name of the repository, a description and the local location where you would like to store the source code
Create a project for the repository
After clicking on the Create button shown in Figure 4 and once the repository is created locally, you are prompted to create a Project to store into it.
Let now create a ASP.NET MVC application and check "Add to source control" option while creating a project in Visual Studio.
Add the source code to GitHub
Now add source code to the Github. Once the project is created, click on the Team Explorer tab, and expand the Project tree. Click on the Changes button.
Clicking on the Changes button navigates to the window as shown below. Enter a description and press the Commit button.
Once committed, synchronize the locally committed source code to the public source hosted on GitHub and then click on Push link which will synchronize the changes.
Once complete, now you can see the code is public on the GitHub site using browser.