git 命令
设置全局 Git 用户名和密码
git config --global user.name “Your Name”
git config --global user.email “youremail@yourdomain.com”
git config --list 查看信息
git commit之后,撤销commit
git reset --soft HEAD^
git提交远程仓库
git remote add 远程仓库别名 远程仓库git路径
git push 远程仓库别名 远程仓库分支
git 强推失败(新建其它分支,将项目push到新建的分支上,后期再进行merge)
1、新建分支
git branch 分支名
2、切换分支
git checkout 分支名
3、进行项目上传
git add .
git commit -m “提交的信息”
git remote add origin 远程仓库地址
git push -u origin 分支名
git更新fork仓库
1、git remote add upstream https://gitee.com/A/xxxx.git
2、git fetch upstream
3、git merge upstream/master
4、git push origin master