2017-02-14 38 views
6

我想將我現有的解決方案添加到Github,並且我觀看了很多YouTube視頻。但他們都只向我展示瞭如何創建新項目。我如何在Github上添加現有的項目?在Visual Studio 2017社區版中沒有文件 - >添加到源代碼管理選項!如何從Visual Studio 2017向GitHub添加現有的解決方案?

+0

剛剛閱讀此https://github.com/blog/2285-github-extension-now-supports-visual-studio-2017-rc –

+0

首先從github創建一個新的存儲庫,然後將您的代碼放入其中。 – Pavvy

+0

請參閱https://stackoverflow.com/questions/42217847/how-do-i-add-an-existing-solution-to-github-from-visual-studio-2017 – Barka

回答

4

2.選擇文件|添加到源代碼管理

在VS 2017社區中不存在。

+0

這不是正確的答案。它在社區版中運行良好。看到我的答案的步驟。 – Barka

12

您可以通過以下步驟實現它:

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

,創建一個本地的Git倉庫

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

與無主分支

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 

我創建一個空庫希望這有助於你的解決方案現在在Github

+4

看不到「主頁|未提交的提交」在第4步 –

相關問題