如何从 Visual Studio 2013 向 GitHub 添加现有解决方案
问题描述:
我浏览了许多关于 VS 2013 中新的 Git 集成的网页,但他们没有处理向 Github 添加现有解决方案的问题.事实上,我找不到太多关于使用 GitHub 而不是 Visual Studio Online 的信息.
I have looked through many web pages on the new Git integration in VS 2013 and they do not deal with adding an existing solution to Github. In fact I can't find much on using GitHub instead of Visual Studio Online.
谁能告诉我我如何从现有解决方案开始并使用 VS 2013 中的工具将其添加到 Github.
Can anyone tell me how I start from an existing solution and add it to Github using the tools in VS 2013.
答
好的,这对我有用.
- 在 Visual Studio 2013 中打开解决方案
- 选择文件 |添加到源代码管理
- 选择 Microsoft Git 提供程序
这将创建一个本地 GIT 存储库
That creates a local GIT repository
- 浏览 GitHub
- 创建一个新的存储库不要选择用自述文件初始化这个存储库
这会创建一个没有主分支的空仓库
That creates an empty repository with no Master branch
- 创建后打开存储库并复制 URL(它在当前版本的屏幕右侧)
- 返回 Visual Studio
- 确保在工具/选项/源代码控制/插件选择下选择了 Microsoft Git 提供程序
您的解决方案现已在 GitHub 中
Your solution is now in GitHub