1、下载Git Bash
官方地址:https://gitforwindows.org/
百度云盘:链接:https://pan.baidu.com/s/1RDAld34DVNVzj_qlBEAOJg 密码:4mp1
2、运行Git Bash
默认安装即可,省略…
3、生成公钥
找到本地项目,点击右键->打开Git Bash Here,输入命令行:ssh-keygen -t rsa -C 邮箱地址
,如图3-1所示,
图3-1
4、登录码云账号
找到如图4-1所示位置:
图4-1
将生成的本地id_rsa.pub内容复制到公钥框,如图4-2所示:
图4-2
成功后,如图4-3所示:
图4-3
5、点击码云账户右上方加号,新建项目
按要求填写内容,成功如图5-1所示:
图5-1
6、初始化本地项目
git config --global user.name 你的名字(随便写) //备注:此命令为提交后显示提交人信息
git config --global user.email 你的邮箱
git init
git remote add origin 码云项目地址
备注:码云项目地址为克隆\下载框里面内容
7、提交代码
git pull origin master
git touch init.txt
git add .
git commit -m ‘初始化项目”
git push origin master
8、执行所有命令
成功,如图8-1所示,
图8-1