Setting Up GitHub to work with Visual Studio 2013 Step-by-Step
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.
You will get an option to choose between TFS or Git. Select ìGitî and place a checkmark to use it in the future.
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î.
Go inside the newly created repository and copy the clone URL. You will need this in the next step.
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î.
After you hit the publish button, you may need to authenticate with your Github username and password if you have not done so already.
You should see the following message:
Go ahead and hit the ìSyncî button and you will see the following message:
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î.
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î.
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.
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.
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.
Head back over to ìTeam Explorerî click ìChangesî then enter a description and click ìCommitî.
Again you will be asked to Sync with the server from your local repo, and you will need to click ìSyncî again.
Switch back to GitHub and look at your repo and the change should be reflected.
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.
Leave a Comment