当使用git出现错误:
Author identity unknown
*** Please tell me who you are.
Run
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
fatal: empty ident name (for <2454373641@qq.com>) not allowed
解决方法:
- git init
- git config user.name "gitee/gitHub的用户名称"
- git config user.email "邮箱"
- git add .
- git commit -m "描述"
切换账号出现没有权限
移除git配置项
git config --system --unset credential.helper
全局配置git配置
git config --global credential.helper store
git clone 仓库地址
git branch -a //查看所有分支
git branch -r //查看所有远程分支
git branch 分支名 //创建分支
git checkout 分支名 //跳转到对应分支
git add . //本地缓存
git commit -m "描述"
git pull //从仓库获取
git push //上传至仓库
A分支合并到B分支
git checkout B分支
git pull
git merge A分支
git push