1、初次使用设置姓名和邮箱
git config --global user.name "你的姓名"
git config --global user.email xxxxx@xxxxx
2、clone 项目
a、
![](https://img.haomeiwen.com/i4754249/99cb036b9a97e2c6.png)
b、
![](https://img.haomeiwen.com/i4754249/520dc17acb3c021f.png)
c、
![](https://img.haomeiwen.com/i4754249/045aed451b09a425.png)
![](https://img.haomeiwen.com/i4754249/8c083f1311da3c22.png)
d、打开终端,输入 git clone 粘黏刚拷贝的地址
![](https://img.haomeiwen.com/i4754249/644846f8642fbca0.png)
e、
![](https://img.haomeiwen.com/i4754249/d1fa6207dcea3cdd.png)
f、输入ssh-keygen -t rsa -b 4096 -C "邮箱"
![](https://img.haomeiwen.com/i4754249/138f580ac860a2b0.png)
![](https://img.haomeiwen.com/i4754249/0cc6dd5adc01668b.png)
g、cat ~/.ssh/id_rsa.pub
![](https://img.haomeiwen.com/i4754249/a1d5b7e6f4d1d7c9.png)
h、
![](https://img.haomeiwen.com/i4754249/6f3c4e95ed03e65d.png)
![](https://img.haomeiwen.com/i4754249/d8558fdd5f5e4645.png)
i、输入和d一样的内容
![](https://img.haomeiwen.com/i4754249/08e61a63deaf8384.png)
3、添加文件并提交
![](https://img.haomeiwen.com/i4754249/df70582981834f88.png)
如果在commit过程中遇到git reset HEAD <file>不用管,继续commit
网友评论