官方网址:https://git-scm.com/
配置命令:
git init
git config --global user.name "用户名"
git config --global user.email "邮箱"
远程命令:
git clone 需要的地址
git clone -b 分支名 地址
git remote add origin [远程仓库地址]
git remote rm origin
基本推送命令:
git add .
git add 文件名
git commit -m "备注信息"
# 恢复暂存区的指定文件到工作区
git checkout [文件名]
# 恢复暂存区的所有文件到工作区
git checkout .
git pull
git diff
git push origin 分支名称
# 查看分支
git branch
# 创建分支
git branch [名称]
# 切换分支
git checkout [名称]
# 创建加切换分支
git checkout -b [名称]
#合并某分支 B合并到A
#切到A分支
git checkout branchA
#将B分支合并到A分支
git merge branchB