简体   繁体   English

如何将现有的Git存储库导入VSTS?

[英]How to import existing Git repo into VSTS?

I have an existing Git repository on a local server. 我在本地服务器上已有一个Git存储库。

I would like to move this repository to VSTS. 我想将此存储库移至VSTS。 I have created a VSTS account and created my project at the following URL: https://[MyCompanyName].visualstudio.com/_git/MyFirstProject 我已经创建了VSTS帐户,并通过以下URL创建了我的项目: https://[MyCompanyName].visualstudio.com/_git/MyFirstProject

Now I would like to move all of my code from my local Git server (F:\\Repos\\ExistingCodeBase) to my new VSTS Git repository. 现在,我想将所有代码从本地Git服务器(F:\\ Repos \\ ExistingCodeBase)移至新的VSTS Git存储库。

How can I do this? 我怎样才能做到这一点? It is not required, but is there a way to do this that retains the existing repository's history ? 它不是必需的,但是有什么方法可以保留现有存储库的历史记录吗?

This is the official way of importing your existing git repo to VSTS: 这是将您现有的git repo导入VSTS的官方方法:

https://docs.microsoft.com/en-us/vsts/git/import-git-repository?view=vsts https://docs.microsoft.com/en-us/vsts/git/import-git-repository?view=vsts

将VSTS git存储库的URL作为远程存储添加到本地存储库中,然后推送到该远程存储。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM