如何将项目代码从本地计算机导入到Azure Repos?

编程入门 行业动态 更新时间:2024-10-26 02:28:49
本文介绍了如何将项目代码从本地计算机导入到Azure Repos?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我要导入到Azure Repos项目的Visual Studio中的本地PC上已有代码.我已经在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存储库,请参考以下命令将项目导入到Azure Git存储库:

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 commit -m 'initial commit' git push -u origin master

然后将在Azure Git存储库中管理本地计算机中的项目.

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存储库,请参考以下步骤将本地项目导入到Azure TFVC存储库:

If you are using TFVC repo in Azure Devops, please refer below steps to import the local project to Azure TFVC repo:

  • 使用VS连接TFVC

  • connect TFVC with VS

    在VS中->团队资源管理器->管理连接->添加帐户->输入用于登录Azure Devops的电子邮件地址和密码->选择TFVC存储库->连接.

    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存储库映射到本地目录中.

    map TFVC repo in a local directory.

    点击地图&获取按钮以映射TFVC存储库并下载指定目录中的文件(在下面的示例中为C:\ Users \ Administrator \ Source \ Workspaces \ Git2).

    Click Map & Get button to map the TFVC repo and download the files in the specified directory (as C:\Users\Administrator\Source\Workspaces\Git2 in below example).

    将本地项目复制到映射目录并签入更改

    copy the local project to the mapped directory and checkin changes

    在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?

    本文发布于:2023-08-02 15:30:49,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1278915.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:如何将   导入到   代码   计算机   项目

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!