GitHub转华为软件开发云详细教程
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了GitHub转华为软件开发云详细教程相关的知识,希望对你有一定的参考价值。
一、复制GitHub的代码库地址
首先,打开Github网页,找到要迁移的代码仓库地址,如下:

点击Clone or Download,出现以下界面

点击Copy toclipboard(复制到粘贴板)
二、将GitHub代码仓库下载到本地
打开https://desktop.github.com/网址,下载GitHub工具GitHub Desktop,安装;
在桌面点击GitHub Desktop图标

之后点击中间的图标Clone a Repository,如图

将之前粘贴板的内容复制到URL处,并选择本地的一个存放位置,点击Clone

可在所选本地文件夹处发现克隆到本地的代码仓库

三、将下载到本地的代码上传到华为软件开发云
前期准备:配置好用户名、密码、SSH公钥(详情请参考华为软件开发云使用指导)
打开Git Bash(本文将以Git Bash为工具进行指导),推送本地仓库代码到远程华为软件开发云代码仓库。
用Git Bash寻找到下载到本地的代码仓库,使用cd命令

可以通过git branch命令查看当前有几个分支(用于校验)

用命令删除之前关联的GitHub远程仓库git remote rm origin

然后重新关联华为软件开发云仓库地址git remote add origin仓库地址

之后进行各个分支的推送工作,使用命令git push –u origin分支名


回到华为软件开发云代码托管界面进行校验上传结果

以上是关于GitHub转华为软件开发云详细教程的主要内容,如果未能解决你的问题,请参考以下文章