Michael Crump bio photo

Michael Crump

Works at Microsoft on Azure

Twitter Google+ LinkedIn Instagram Github Youtube

Intro

Iíll admit that the easier you make something, the more I will use it. While I know enough about the command line to work with Github, Iíd much prefer it to be integrated inside my IDE. In this tutorial, Iíll show you just how to do that using Visual Studio 2013.

Begin by creating any type of project. In my case, I created a new Windows Phone 8 app. Again, this doesnít matter. Select ìFileî->îAdd to Source Controlî as shown below.

image

You will get an option to choose between TFS or Git. Select ìGitî and place a checkmark to use it in the future.

image

Head over to github.com and create a new repository and give it any name you want. I named mine ìGitHubVS2013î, left the rest as default and finally hit ìCreate Repositoryî.

image

Go inside the newly created repository and copy the clone URL. You will need this in the next step.

image

Beside the Solution Explorer tab, you will see Team Explorer. Click on ìUnsynced commitsî and add the clone URL from the step before and press ìPublishî.

image

After you hit the publish button, you may need to authenticate with your Github username and password if you have not done so already.

image

You should see the following message:

image

Go ahead and hit the ìSyncî button and you will see the following message:

image

Now that your account is tied to the repository, you need to upload any unsynced commits. Select ìHomeî from the Team Explorer menu then select ìChangesî.

image

Here you will see a list of your project and all of the files to be included in the commit. Give it a description and hit ìCommitî.

image

You should see now that your commit was created locally and you will need to Sync to share your changes with the server. Click on the ìsyncî button to do that.

image

This will bring you to Unsynced Commits. Simply hit ìSyncî and then navigate over to your Github.com repo and your project should be there.

image

image

Making a Change

If you switch back over to Solution Explorer and make a change, you will see a red check mark on the file as shown below. A blue keypad means that it is already checked in.

image

Head  back over to ìTeam Explorerî click ìChangesî then enter a description and click ìCommitî.

image

Again you will be asked to Sync with the server from your local repo, and you will need to click ìSyncî again.

image

Switch back to GitHub and look at your repo and the change should be reflected.

image

Wrap-Up

Now in order to keep you sanity, bookmark this page and whenever you setup a new project you can use this guide to walk you through it.  Because if you are anything like me, you will forget in about 6 months (I mean minutes.) Thanks for reading.