You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/configuration.md
+64Lines changed: 64 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -243,6 +243,70 @@ values, but here they are if you need to:
243
243
### regex
244
244
This is the regex which is used to match the current branch to the correct branch configuration.
245
245
246
+
### source-branches
247
+
Because git commits only refer to parent commits (not branches) GitVersion sometimes cannot tell which branch the current branch was branched from.
248
+
249
+
Take this commit graph
250
+
251
+
```
252
+
* release/1.0.0 * feature/foo
253
+
| ________________/
254
+
|/
255
+
*
256
+
*
257
+
* (master)
258
+
```
259
+
260
+
By looking at this graph, you cannot tell which of these scenarios happened:
261
+
262
+
1. feature/foo branches off release/1.0.0
263
+
- Branch release/1.0.0 from master
264
+
- Branch feature/foo from release/1.0.0
265
+
- Add a commit to both release/1.0.0 and feature/foo
266
+
- release/1.0.0 is the base for feature/foo
267
+
268
+
2. release/1.0.0 branches off feature/foo
269
+
- Branch feature/foo from master
270
+
- Branch release/1.0.0 from feature/foo
271
+
- Add a commit to both release/1.0.0 and feature/foo
272
+
- feature/foo is the base for release/1.0.0
273
+
274
+
Or put more simply, you cannot tell which branch was created first, `release/1.0.0` or `feature/foo`.
275
+
276
+
To resolve this issue, we give GitVersion a hint about our branching workflows by telling it what types of branches a branch can be created from. For example, feature branches are, by default, configured to have the following source branches:
This means that we will never bother to evaluate pull request branches as merge base options and being explicit in this way also improves the performance of GitVersion.
281
+
282
+
### is-source-branch-for
283
+
The reverse of `source-branches`. This property was introduced to keep it easy to extend GitVersion's config.
284
+
285
+
It exists to make it easier to extend GitVersion's configuration. If only `source-branches` exists and you add a new branch type, for instance `unstable/`, you then need to re-define the `source-branches` configuration value for existing branches (like feature/) to now include the new unstable branch.
0 commit comments