Configuring Visual Studio 2012 to work with GitHub

Step 1: Register at GitHub.com

In order to work with GitHub (accessing source code, forking, checking-in etc.) you would need an active user account with GitHub.

Registration is free.

Step 2: Install the “Git Source Control Provider” Visual Studio Extension Visual Studio 2012 does not support Git by default (VS2013 supports Git right out of the box). Microsoft has created an extension that adds the support and required features to VS 2012.

You can download this extension here

Step 3: Install VS2012 Git Source Control Provider

Installation is quick… just click Next… Next… Next and you are done.

Configuring VS 2012 To Work With GitHub 1

 

Configuring VS 2012 To Work With GitHub 2

 

Configuring VS 2012 To Work With GitHub 3

 Step 4: Configure VS2012 to use the GIT Source Control Provider Select: Tools -> Options Configuring VS 2012 To Work With GitHub 4 Step 5: Find the Source Control Provider Settings In the options page choose: Source Control Provider

Configuring VS 2012 To Work With GitHub 5

Step 6: Change the Source Control Provider Settings From the drop down list select the Microsoft Git Provider and click OK

Configuring VS 2012 To Work With GitHub 6

Step 7: Fork the project In this tutorial, I chose the ASP.NET MVC project located here https://github.com/aspnet/Mvc Click the Fork button located in the top-right corner of the screen

Configuring VS 2012 To Work With GitHub 7

This will result in your own copy of the repository located in: https://github.com/{GIT-USERNAME}/Mvc which will be available for you in this text box:

Configuring VS 2012 To Work With GitHub 8

Step 8: Clone the repository on your local machine In the Team Explorer window, expand the Local Git Repositories node. Click Clone Copy your forked repository address from the GitHub website and paste it into the repository location text box

Configuring VS 2012 To Work With GitHub 9

Step 9: Configure your GitHub Credentials On the Team Explorer window, click on Home -> Settings

Configuring VS 2012 To Work With GitHub 10

Select Git Settings

Configuring VS 2012 To Work With GitHub 11

Fill in your Git username and email address

Configuring VS 2012 To Work With GitHub 12

Visual Studio will ask for your GitHub password the first time to try to synch changes. Congatulations! You can now work in Visual Studio 2012 and sync your work with GitHub.