Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I add an existing Solution to GitHub from Visual Studio 2017?

Tags:

I want to add my existing solution to Github and I've watched lots of youtube videos. But all of them only showed me about creating new projects. How can I add the existing project on Github? There is no File-> Add to source control option in Visual Studio 2017 Community Edition!

like image 691
Susen Maharjan Avatar asked Feb 14 '17 04:02

Susen Maharjan


People also ask

How do I add a repository to GitHub Visual Studio 2017?

To install the Git plugin for Visual Studio, run the Visual Studio 2017 installer and click on Modify. Once the screen loads, navigate to the Individual Components tab, as shown in the following screenshot. Scroll down to the Code tools section and select Git for Windows & GitHub extension for Visual Studio.


2 Answers

You can achieve it by following below steps :

1.Open the solution in Visual Studio 2017 2.Select File | Add to Source Control 3.Select the Microsoft Git Provider 

That creates a local GIT repository

1.Browse to GitHub 2.Create a new repository DO NOT SELECT Initialize this repository with a README 

That creates an empty repository with no Master branch

1.Once created open the repository and copy the URL (it's on the right of the screen in the current version) 2.Go back to Visual Studio Make sure you have the Microsoft Git Provider selected under Tools/Options/Source Control/Plug-in Selection 3.Open Team Explorer 4.Select Home | Unsynced Commits 5.Enter the GitHub URL into the yellow box (use HTTPS URL, not the default shown SSH one) 6.Click Publish 7.Select Home | Changes 8.Add a Commit comment 9.Select Commit and Push from the drop down 

I hope this helps , your solution is now in Github

like image 136
coder3521 Avatar answered Sep 21 '22 02:09

coder3521


2.Select File | Add to Source Control

Doesn't exist in VS 2017 Community.

like image 36
Wietse-0803 Avatar answered Sep 21 '22 02:09

Wietse-0803