当我们不清楚当前git的登录信息时,可以通过git的命令控制面板查看
1.查看用户名和邮箱地址
git config user.name
git config user.email
2.修改用户名和邮箱地址
git config --global user.name "xxxxx"
git config --global user.email "xxxxxx"
![](https://img.haomeiwen.com/i13131051/60d4f850514b7676.png)
3.克隆项目到本地
git clone 目标仓库地址
4.更新本地代码
git pull
5.提交代码到目标仓库
5.1 添加代码到版本库: git add .
5.2 提交代码说明: git commit -m "说明内容"
5.3 提交代码: git push
6.提交记录
git log
![](https://img.haomeiwen.com/i13131051/7ff1d04edc73d085.png)
网友评论