# 拉分支操作
git clone -b release/test http://gitlab.project.com/projects/project-dev.git
# 拉代码操作
git pull
git pull origin <branch-name>
# 创建分支
git branch <branch-name>
git checkout -b <branch-name>
# 切换分支
git checkout <branch-name>
# 远程同步
git push --set-upstream origin <branch-name>
# 查看修改不同(差异)
git diff
# 修改文件后add添加
git add . (所有)
# 查看状态
git status
# 提交commit
git commit -m "描述信息"
git commit -am "描述信息"
# 推到服务端push
git push
# 查看远程分支命令
git brach -r
# 删除远程分支的命令 (删除后记得pull重新同步)
git push origin --delete <branch-name>
# 重新提交分支远程同步
git branch --set-upstream-to=origin/<branch> v1.0-dev
# 修复冲突
git merge origin/<branch-name> -m "修复冲突"
# 删除本地分支
git branch -D <branch-name>