1.初始化常驻分支 develop sandbox
git checkout master
git branch develop
git push origin develop
git checkout master
git branch sandbox
git push origin sandbox
2.创建新功能分支
git checkout master
git branch feature/new_branch
git push origin feature/new_branch
3.feature开发测试完成,合并到develop
git checkout develop
git merge --no-ff feature/new_branch
4.合并到sandbox分支,并且提测
git checkout sandbox
git merge --no-ff feature/new_branch
git tag -a 20201103_sandbox_xxx -m 'xxx需求提测'
git push origin 20201103_sandbox_xxx
5.QA测试通过,申请上线操作
git checkout master
git merge --no-ff feature/new_branch
git tag -a 20201103_release_xxx -m 'xxx需求上线'
git push origin 20201103_release_xxx
6.删除新功能分支
git branch -d feature/new_branch
git push origin --delete feature/new_branch
7.修改线上bug
git checkout master
git branch hotfix/bug_branch
git push origin hotfix/bug_branch
8.上线
git checkout master
git merge --no-ff hotfix/bug_branch
git tag -a 20201103_hotfix_xxx -m 'hotfix修复bug'
git push origin 20201103_hotfix_xxx
9.删除bug分支
git branch -d hotfix/bug_branch
git push origin --delete hotfix/bug_branch
网友评论