So I’m an idiot, and it took me a good while to work out how to get GitHub to work with Microsoft’s Visual Studio (I would use, but you know, GitHub) and for reference, here’s how I did it:


Heads Up

Because I’m learning C as part of my university degree my example code will be in C, but feel free to use your own


  1. Create a repository for your program on GitHub, I recommend doing this here for greater control over the repo’s settings
  2. Open visual studio and login to github, this can be done by going to Team Explorer which, by default, is on the right sidebaras
  3. Click clone and select the repository you want and wait for it to set itself up
  4. You may notice that at the bottom of the git bar it says solutions, click ‘new’ to make a new solution or open to import one
  5. Build your program, here’s some sample code:
  6. Run your program
  7. Quit Visual Studio (to make sure everything has closed)
  8. Open visual studio and click “changes” in the team explorer sidebar
  9. Type a description of your changes and click commit
  10. Return to the team explorer home and click sync
  11. Click sync

And that’s it, it should all be done now, you should check GitHub to make sure things are all done.

Here’s a demo repo that I set up to test this. You can have as many solutions as you want in a repository

And that’s how I got it to work. Of course it could just be my computer being funny that led me to have to do it this way but just in case it didn’t work for you this is how I got it working.

If you got it to work let me know in the comments below, maybe even link to it too! Until next time, see you in the future


One thought on “Syncing to Github from Visual Studio

Let me know what you think!

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s