VS Tips: How to add Visual Studio Solution to GitHub Repository

Visual Studio Logo

Do you need to add a Visual Studio Solution to GitHub Repository?

It’s Easy! Please follow the steps below:

  • Create new Repository in GitHub. (Keep it blank).
  • Open your existing VS Solution
  • Make sure you use Git as Source Control by going to Tools/Options/Source Control 
  • In VS, click File/Add To Source Control.  
This image has an empty alt attribute; its file name is image-1.png

  • In “Team Explorer” window click “Sync“.
  • Select “Publish Git Repo“.
This image has an empty alt attribute; its file name is image.png

  • Get URL from GitHub; and Enter into VS.
  • Click “Publish“.
  • Congratulations!


If you use VS 2019  version 16.8 or higher, the process has changed. Please see MS Announcement on Git Experience in VS.

Categories: Software Developer

Tags: , , , ,

Leave a Reply

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

WordPress.com Logo

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

Facebook photo

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

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: