从IDE迁移本地Git仓库到Visual Studio Online [英] Migrate local Git repo to Visual Studio Online from IDE

查看:169
本文介绍了从IDE迁移本地Git仓库到Visual Studio Online的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Visual Studio 2013中连接了Visual Studio Online创建了一个新的团队项目。使用IDE,我克隆了一个本地Git仓库(从GitHub下拉)到本地Git仓库部分。

当我浏览Visual Studio的(其他人需要更改.git / config文件)。这是否已经修复,因此我可以完全使用IDE?或者我错过了什么?

解决方案

此发布选项仅在连接到团队项目时以及设置git存储库的远程URI时才会显示为了解决这个问题,您可以手动编辑git文件,但我倾向于打开Git命令提示符(右键单击回购并选择 >打开命令提示符



在命令行中输入:


git remote set-url origin http:// [server]:[port] / tfs / [projectcollection] / _git / [ProjectName]



git pull



[[解决任何合并问题]]



git push



I created a new Team Project on Visual Studio Online that I have connected to in Visual Studio 2013. Using the IDE, I cloned a local Git repo (that was pulled down from GitHub) into the Local Git Repositories section.

When I went through the documentation on Visual Studio's website, it showed an option to "Publish to {Team Project}."

Mine doesn't show this:

And it looks like this has been a problem in the past (others have needed to change the .git/config file). Has this been fixed yet so I can use the IDE completely? Or am I missing something?

解决方案

This publish option is only shown when you are connected to a Team Project and when the remote uri of the git repository is set to the TFS uri.

To fix this you can manually edit the git files, but I tend to open the Git Command Prompt (right-click the repo and choose Open Command prompt.

On the command line enter:

git remote set-url origin http://[server]:[port]/tfs/[projectcollection]/_git/[ProjectName]

git pull

[[ resolve any merge issues ]]

git push

这篇关于从IDE迁移本地Git仓库到Visual Studio Online的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆