GitHub in Visual Studio 2015

gitVisual StudioVersion control

Please contribute by voting. Thanks!

This is how you create a new GitHub repository and use it with Visual Studio 2015.

Create a new project and repository

  1. Open Visual Studio. Create a new project (and solution). Write some code, save all files and close the solution.

  2. Open upp your favourite browser and head over to GitHub. Create a GitHub account (if you don't have one already).

  3. Create a GitHub repository by clicking the plus-icon in the top right corner. Select a licence and set Visual Studio as ignore.

  4. Go back to Visual Studio and open up the Team Explorer panel. Go to the connect-view (the green icon picturing a power plug). Click on "Manage connections" and select Connect to GitHub. Fill in your details and hit the Login-button.

  5. In the Team Explorer panel, click on the "clone" link for the newly created GitHub connection. Select the correct repository, enter the local path to your newly created project and click the clone button to continue.

  6. Go to Team Explorer in Visual Studio, select your cloned repo under "local git repositories" by double clicking it. A new view will open up in Team Explorer.

  7. Click the Settings button under Project and verify / update your git settings (like username and email address)

  8. Open up your newly created solution in Visual Studio

  9. Build the project

  10. Click the Changes button under Project

  11. Expand "Untracked Files" and select AddAll

  12. Write a commit message and select "commit and push" from the commit button

Your files will now sync to github

Making changes

  1. Make a change in one of your source files. Build and run your tests

  2. Go to the Team Explorer-view

  3. Click the Changes-button

  4. Diff your changes

  5. Write a meaningful comit message and select "commit and push" from the commit button

Article created: Sep 6 '16. Edited Sep 8 '16.

Your comment

You need to sign up / log in to comment this article


Created by Talan Jamil [3] Sep 6 '16

Share article

Do you know about


Write an article