Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
H
hs-git-flow-case
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
何虹
hs-git-flow-case
Commits
12defc00
Commit
12defc00
authored
Dec 15, 2020
by
zyj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update zyj.md
parent
6d89d4cb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
61 deletions
+33
-61
郑一建.md
git-flow-case-answer/郑一建.md
+33
-61
No files found.
git-flow-case-answer/郑一建.md
View file @
12defc00
...
...
@@ -11,90 +11,62 @@
## case1: 周一时,如何对上述4个新功能进行开发,git flow如何操作?
```
按照每个功能新建出各个feature分支,开发完成一个就合并到dev一个,全部开发完成并上传到dev上后,dev分出release 3.0.10分支,进行测试
git clone -b dev git地址
git checkout -b A-feature dev //创建并切换到A-feature分支上
git add .
git commit -m 'A' //开发完成提交
git checkout dev
git pull
git merge --no-ff A-feature //在dev上对A-feature进行合并,并保留A-feature分支历史
git push //提交dev到线上
git branch -d A-feature //删除A-feature
以次类推
git checkout -b B-feature dev
......
直到ABCD功能全部开发完成上传到dev
然后
git checkout -b release-3.0.10 dev
进行测试
按照每个功能新建出各个feature分支
git flow:
git flow feature start A
git flow feature start B
git flow feature start C
git flow feature start D
```
## case2: 周4下午,当这4个功能都开发完成后,现在要进行封版处理,如何操作?
```
开发人员在dev上测试通过后,新建出release 3.0.10分支,测试人员在基于3.0.10上进行测试,如期间出现bug,就新建hotfix改完合并回3.0.10在让
测试人员进行测试,测试通过后,开发人员合并回master,打上tag3.0.10进行封存
git checkout -b release-3.0.10 dev
git checkout master
git merge --no-ff release-3.0.10
git push
git branch -d release-3.0.10
git tag -a v0.1.0 master
git push --tags
开发人员将功能全部finish到dev,再新建出release3.0.10版本
git flow:
git flow feature finish A
git flow feature finish B
git flow feature finish C
git flow feature finish D
git flow release start 3.0.10
```
## case3: 功能E对开始开发时间有要求吗?对合并时间有要求吗?
```
开发时间无要求,合并时间需在
本周版本发布之后在进行上传
合并
开发时间无要求,合并时间需在
release/3.0.10 finish之后在进行
合并
```
## case4: 周5到周6,测试人员对即将发布的新版本3.0.10(beta)进行了测试,发现了新的bug,如何处理?
```
新建hotfix 3.0.10_bug分支改完合并回3.0.10在让测试人员进行测试
git checkout dev
git merge --no-ff hotfix-3.0.10_bug
git push
git branch -d hotfix-3.0.10_bug
git flow bugfix start bugfix_{bug} release/3.0.10
git flow bugfix finish bugfix_{bug}
或者
直接在release/3.0.10分支上进行修改
```
## case5: 下周一,上周的3.0.10测试完全通过,也没发现新的问题,需要正式发布,如何操作?
```
将release 3.0.10版本合并回master,打上tag,删除release 3.0.10
git checkout master
git merge --no-ff release-3.0.10
git push
git branch -d release-3.0.10
git tag -a v3.0.10 master
git push --tags
将release 3.0.10版本合并回master
git flow release finish 3.0.10
将master 3.0.10 交给部署人员去部署到项目上去
```
## case6: 又过了2天,项目里发现一个严重的bug,需要立马修复,如何操作?
```
从master上分出hotfix3.0.10_bug,修复完成后,根据合并回mater,再次打上3.0.10_bug分支
git checkout -b hotfix-3.0.10_bug master
git add .
git commit -m 'hotfix-3.0.10_bug'
git checkout master
git merge --no-ff hotfix-3.0.10_bug
git push
git branch -d hotfix-3.0.10_bug
git tag -a v3.0.10 master
git push --tags
git flow hotfix start hotfix3.0.10_bug
git flow hotfix finish hotfix3.0.10_bug
git flow release start 3.0.10_bug
git flow release finish 3.0.10_bug
将master 3.0.10_bug 交给部署人员去部署到项目上去
```
## case7: 环球项目,有一特殊需求新功能D需要开发,开发完成后测试并部署到项目中去,该如何操作?
```
找到tag3.0.2的master分支,分出huanqiu分支,新建feature分支,开发完成后合并回huanqiu分支,打上release 3.0.2_功能D版本,测试在此版本上测试通过后,使用tag3.0.2_功能D huanqiu分支推到环球项目上
git checkout -b huanqiu master vtag3.0.2
git checkout -b D-feature huanqiu
git add .
git commit -m 'D'
git checkout huanqiu
git pull
git merge --no-ff D-feature
git push
git branch -d D-feature
git tag -a v3.0.2_D huanqiu
git push --tags
由于环球项目已经落后多个版本,使用新版可能会造成意外的问题,所以应该为项目单独新建出一个长期的分支,进行后续的需求开发
git flow support start huanqiu 3.0.2
git flow feature start D
git flow feature finish D
git flow release start 3.0.2_D
git flow release finish 3.0.2_D
将huanqiu新分支 3.0.2_D 交给部署人员去部署到项目上去
```
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment