1、说明
需要本地有安装有git,从官网下载https://git-scm.com/downloads
选择对应系统版本。
2、配置本地的git
打开git Bash
生成新的密钥,email可以为任何email地址
ssh-keygen -t rsa -C "您的email"
复制秘钥
Windows:
clip < ~/.ssh/id_rsa.pub
Mac:
pbcopy < ~/.ssh/id_rsa.pub
Linux (requires xclip):
xclip -sel clip < ~/.ssh/id_rsa.pub
写入到华为SSH秘钥管理中
3、使用git clone项目到本地
打开git Bash
输入命令
git clone {git地址}
成功后即可在该目录看到克隆下来的项目
4、推送至远端仓库
在项目目录下打开git Bash,输入命令
git push
即可将新代码推送至主干
5、git使用教程推荐
https://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000