我在 Visual Studio 中的本地 PC 上有现有代码,我想将其导入 Azure Repos 项目.我已经在 Azure DevOps 中创建了项目.我在 VS 2017 中使用 Team Explorer 连接到我的 DevOps 项目.我不知道如何进行初始导入.
I have existing code on local PC in Visual Studio that I want to Import to the Azure Repos project. I have already created the Project in Azure DevOps. I have used Team Explorer in VS 2017 to Connect to my DevOps project. I don't know how to do the initial Import.
推荐答案如果您在 Azure Devops 中使用 Git repo,请参考以下命令将项目导入 Azure Git repo:
If you are using Git repo in Azure Devops, please refer below commands to import projects to Azure Git repo:
#In the local directory for the root of the project git init git remote add origin <URL for Azure Git repo> git add . git status git commit -m "initial commit" git push -u origin master然后本地机器中的项目将在 Azure Git repo 中进行管理.
Then the project in the local machine will be managed in Azure Git repo.
注意:如果本地项目已经在本地 git repo 中管理,则可以跳过 git init 命令.
Note: if the local project has already been managed in a local git repo, then you can skip git init command.
如果您在 Azure Devops 中使用 TFVC repo,请参考以下步骤将本地项目导入 Azure TFVC repo:
If you are using TFVC repo in Azure Devops, please refer below steps to import the local project to Azure TFVC repo:
在VS中->团队资源管理器->管理连接 ->添加帐户->输入用于登录 Azure Devops 的电子邮件地址和密码 ->选择 TFVC repo ->连接.
In VS -> team explorer -> Manage Connections -> Add an account -> enter the email address and password for sign in Azure Devops -> select the TFVC repo -> Connect.
点击地图 &获取按钮以映射 TFVC 存储库并下载指定目录中的文件(如以下示例中的 C:UsersAdministratorSourceWorkspacesGit2).
Click Map & Get button to map the TFVC repo and download the files in the specified directory (as C:UsersAdministratorSourceWorkspacesGit2 in below example).
在 TFVC 存储库映射目录中复制您的项目 ->团队资源管理器->源代码管理资源管理器 ->单击将项目添加到文件夹图标->选择您在映射目录中复制的所有项目文件->完成 ->团队资源管理器 ->待更改 ->检查更改.
Copy your project in the TFVC repo mapped directory -> team explorer -> Source Control Explorer -> click Add items to folder icon -> select all the project files you copied in the mapped directory -> Finish -> Team Explorer -> Pending changes -> checkin the changes.
因此本地项目将被导入到 Azure devops 中的 TFVC 存储库中.
So the local project will be imported into the TFVC repo in Azure devops.
更多推荐
如何将项目代码从本地计算机导入 Azure Repos?
发布评论