美文网首页
gitflow工作流-常用操作

gitflow工作流-常用操作

作者: 北方小王 | 来源:发表于2020-11-03 15:12 被阅读0次

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

相关文章

网友评论

      本文标题:gitflow工作流-常用操作

      本文链接:https://www.haomeiwen.com/subject/yjobvktx.html