在git中,使用git.commit命令时,这个Please tell me who yoy are 解决办法
出现这个的原因就是您没登陆,您需要登录您的用户名和邮箱
> git config --global user.name "Your name"
> git config --global user.email "email@example.com"
** 1) 个人使用**
远程仓库 -> github
本地仓库 -> 文件夹
**1. 先有远程仓库,再克隆**
1、在github/gitee上新建仓库
2、在本地新建文件夹
3、将远程仓库的代码克隆到本地文件夹**加粗样式**
> git clone https://xxx.git
4、编写代码...
5、将代码提交到本地仓库
> git add *
6、编写提交信息
> git commit -m "[姓名]修改了/提交了"
7、将代码提交到远程仓库
> git push origin master
**2. 先有本地仓库,再有远程仓库**
1、在本地新建文件夹
2、编写代码
3、新建远程仓库
4、将本地的文件夹初始化为本地仓库
> git init
5、将代码提交到本地仓库
> git add *
6、编写提交信息
> git commit -m "message"
7、绑定本地仓库与远程仓库
> git remote add origin https://xxx.git
8、将代码提交到远程仓库
> git push origin master
2) 团队项目
1. 新建远程仓库(组长)
2. 邀请合作者
管理 -> 仓库成员管理 -> 邀请用户
3. 被邀请者在邮箱进行同意
4. 进行多人开发
> git clone 地址
团队编写代码
> git add *
> git commit -m 'message'
*****> git pull origin master (更新远程仓库代码到本地)
> git push origin master (提交本地仓库到远程)
3)版本回退
> git status 查看状态
> git log 查看提交日志
> git reflog 查看所有提交日志
> git reset --hard commitID 回退到某次提交