Skip to content

Commit 7551cad

Browse files
committed
Integrate code review remarks from asbjornu.
1 parent b0c65f7 commit 7551cad

File tree

1 file changed

+58
-33
lines changed
  • docs/input/docs/learn/branching-strategies/gitflow

1 file changed

+58
-33
lines changed

docs/input/docs/learn/branching-strategies/gitflow/examples.md

Lines changed: 58 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -6,53 +6,69 @@ RedirectFrom:
66
- docs/git-branching-strategies/gitflow-examples
77
---
88

9-
These examples are illustrating the usage of the supported `GitFlow` workflow in GitVersion.
10-
To enable this workflow, the build-in template [GitFlow/v1](/docs/workflows/GitFlow/v1.json) needs to be referenced in the configuration as following:
9+
These examples are illustrating the usage of the supported `GitFlow` workflow
10+
in GitVersion. To enable this workflow, the builtin template
11+
[GitFlow/v1](/docs/workflows/GitFlow/v1.json) needs to be referenced in the
12+
configuration as follows:
1113
```yaml
1214
workflow: GitFlow/v1
1315
mode: ContinuousDelivery
1416
```
1517
16-
Where
17-
the [continuous deployment](/docs/reference/modes/continuous-deployment) mode for no branches,
18-
the [continuous delivery](/docs/reference/modes/continuous-delivery) mode for `main`, `support` and `develop` branches and
19-
the [manual deployment](/docs/reference/modes/manual-deployment) mode for `release`, `feature`, `hotfix` and `unknown` branches
20-
are specified.
21-
22-
This configuration allows you to publish CI (Continuous Integration) builds from `main`, `support` and `develop` branches to an artifact repository.
23-
All other branches are manually published. Read more about this at [version increments](/docs/reference/version-increments).
24-
25-
__Notice:__ The _continuous delivery_ mode has been used for the `main` and the `support` branch in this examples (specified as a fallback on the root configuration layer)
26-
to illustrate how the version increments are applying. In production context the _continuous deployment_ mode might be a better option when e.g.
27-
the releasing process is automated or the commits are tagged by the pipeline automatically.
18+
Where
19+
the [continuous deployment][continuous-deployment] mode for no branches,
20+
the [continuous delivery][continuous-delivery] mode for
21+
`main`, `support` and `develop` branches and
22+
the [manual deployment][manual-deployment] mode
23+
for `release`, `feature`, `hotfix` and `unknown` branches are specified.
24+
25+
This configuration allows you to publish CI (Continuous Integration) builds
26+
from `main`, `support` and `develop` branches to an artifact repository.
27+
All other branches are manually published. Read more about this at
28+
[version increments](/docs/reference/version-increments).
29+
30+
:::{.alert .alert-info}
31+
The _continuous delivery_ mode has been used for the `main` and the
32+
`support` branch in this examples (specified as a fallback on the root
33+
configuration layer) to illustrate how the version increments are applied.
34+
In production context the _continuous deployment_ mode might be a better
35+
option when e.g. the release process is automated or the commits are tagged
36+
by the pipeline automatically.
37+
:::
2838

2939
## Feature Branches
3040

31-
Feature branches can be used in the `GitFlow` workflow to implement a feature in an isolated environement. Feature branches will take the feature branch name and use that
32-
as the pre-release label. Will be created from `develop`, `release`, `main`, `support` or `hotfix` branches.
41+
Feature branches can be used in the `GitFlow` workflow to implement a
42+
feature in an isolated environment. Feature branches will take the feature
43+
branch name and use that as the pre-release label. Feature branches will be
44+
created from a `develop`, `release`, `main`, `support` or `hotfix` branch.
3345

3446
### Create feature branch from main
3547

3648
![GitFlow](/docs/img/DocumentationSamplesForGitFlow\_FeatureFromMainBranch.png)
3749

38-
__Notice:__ After the feature branch is merged, the version on `main` is
39-
`2.0.0-5`. This is due to `main` running in _continuous delivery_
40-
mode. If you configured `main` to use _continuous deployment_ the version would
41-
be `2.0.0`.
50+
:::{.alert .alert-info}
51+
After the feature branch is merged, the version on `main` is `2.0.0-5`.
52+
This is due to `main` running in _continuous delivery_ mode. If `main` was
53+
configured to use _continuous deployment_ the version would be `2.0.0`.
54+
:::
4255

4356
### Create feature branch from develop
4457

4558
![GitFlow](/docs/img/DocumentationSamplesForGitFlow\_FeatureFromDevelopBranch.png)
4659

47-
__Notice:__ After the feature branch is merged, the version on `develop` is
60+
:::{.alert .alert-info}
61+
After the feature branch is merged, the version on `develop` is
4862
`1.3.0-alpha.3`. This is due to `develop` running in _continuous delivery_
49-
mode. If you configure `develop` to use _manual deployment_ the version would
50-
still be `1.3.0-alpha.1` and you would have to use pre-release tags to increment the
51-
`alpha.1`.
63+
mode. If `develop` was configured to use _manual deployment_ the version
64+
would still be `1.3.0-alpha.1` and you would have to use pre-release tags
65+
to increment the pre-release label `alpha.1`.
66+
:::
5267

5368
## Hotfix Branches
5469

55-
Hotfix branches are used when you need to do a _patch_ release in the `GitFlow` workflow and are always created from `main` branch.
70+
Hotfix branches are used when you need to do a _patch_ release in the
71+
`GitFlow` workflow and are always created from `main` branch.
5672

5773
### Create hotfix branch
5874

@@ -64,9 +80,11 @@ Hotfix branches are used when you need to do a _patch_ release in the `GitFlow`
6480

6581
## Release Branches
6682

67-
Release branches are used for major and minor releases to stabilize a RC (Release Candidate) or to integrate
68-
features (in parallel) targeting different iterations. Release branches are taken from `main` (or from `develop`)
69-
and will be merged back afterwards. Finally the `main` branch is tagged with the released version.
83+
Release branches are used for major and minor releases to stabilize a RC
84+
(Release Candidate) or to integrate features (in parallel) targeting different
85+
iterations. Release branches are taken from `main` (or from `develop`) and will
86+
be merged back afterwards. Finally the `main` branch is tagged with the
87+
released version.
7088

7189
### Create release branch
7290

@@ -91,15 +109,22 @@ support minors use `support/<major>.<minor>.x` or `support/<major>.<minor>.0`.
91109

92110
![GitFlow](/docs/img/DocumentationSamplesForGitFlow\_SupportBranch.png)
93111

94-
__Notice:__ Depending on what you name your support branch, you may or may not need a hotfix
95-
branch. Naming it `support/1.x` will automatically bump the patch, if you name
96-
it `support/1.3.0` then the version in branch name rule will kick in and the
97-
patch _will not_ automatically bump, meaning you have to use hotfix branches.
112+
:::{.alert .alert-info}
113+
Depending on what you name your support branch, you may or may not need a
114+
hotfix branch. Naming it `support/1.x` will automatically bump the patch,
115+
if you name it `support/1.3.0` then the version in branch name rule will
116+
kick in and the patch _will not_ automatically bump, meaning you have to
117+
use hotfix branches.
118+
:::
98119

99120
## To Contribute
100121

101122
See [contributing examples](/docs/learn/branching-strategies/contribute-examples).
102123

103124
### Source
104125

105-
See `DocumentationSamplesForGitFlow.cs`. To update, modify then run test.
126+
See `DocumentationSamplesForGitFlow.cs`. To update, modify then run test.
127+
128+
[continuous-deployment]: /docs/reference/modes/continuous-deployment
129+
[continuous-delivery]: /docs/reference/modes/continuous-delivery
130+
[manual-deployment]: /docs/reference/modes/manual-deployment

0 commit comments

Comments
 (0)