git-工作流
1 集中式
2 功能式 我们公司目前使用 master (主 用于部署线上) dev(开发/测试)
3 pull request 工作流 gitlab演示 setting->repository->protocted
4 gitflow 工作流 大型项目使用
master
hotfix 直接从master 拉 然后也是直接上传master
release 层
develop
feature->a
feature->b
gitlab建好项目 设置开发者权限
git clone
git checkout -b develop
修改代码
git add --all
git commit -m "备注"
git push origin develop
//
开发者1
git clone
git checkout develop
git checkout -b sanmao develop
修改代码
git add
git commit -m
git checkout develop
git pull origin develop
git merge sanmao
git push
git branch -d sanmao 删除分支
git checkout -b release-0.1 develop
git add git commit -m git push origin release-0.1
git checkout master
git merge release-0.1
git push
git checkout develop
git merge release-0.1
git tag -a 0.1 -m '0.1 initial pubic release' master
git push --tags
//修改bug
git checkout -b issue-#001 master
git add git commit -m
gti push origin isseu-#-001
git checkout master
git merge issue-#001
git push
git checkout develop
gti merge issue-#001
git push origin develop