bug修改流程
hotfix分支的作用是紧急修复一些Bug。它们都是 从 master分支上建立,修复结束后再合并到 develop和 master 分支上。
-
第一步:以master分支作为起点,创建一个hotfix分支
- git checkout -b hotfix-0.1.0 master
- git commit -m "fix bug"
- git push origin hotfix-0.1.0
-
第二步:在hotfix分支上修复Bug,然后提交代码
- git add .
- git commit -m "fix bug"
- git push origin hotfix-0.1.0
-
第三步:合并hotfix分支到master分支
- git checkout master
- git merge --no-ff hotfix-0.1.0
- git push origin master
-
第四步:tag打个自增标签作为修复bug版本(在master分支操作)
- git tag -a v0.1.0fix master
- git push --tags
-
第五步:合并hotfix分支到dev分支
- git checkout dev
- git merge --no-ff hotfix-0.1.0
- git push origin dev
-
第六步:删除hotfix分支
- 删除本地分支 git branch -d hotfix-0.1.0
- 删除远程分支 git push origin --delete hotfix-0.1.0