@@ -8,16 +8,6 @@ RedirectFrom: docs/configuration
8
8
GitVersion, starting from version 3.0, is mainly powered by configuration and no
9
9
longer has branching strategies hard-coded.
10
10
11
- ## Configuration tool
12
-
13
- If you run ` gitversion init ` , GitVersion will launch into a configuration tool,
14
- which can help you configure GitVersion the way you want it.
15
-
16
- Once complete, the ` init ` command will create a ` GitVersion.yml ` file in the
17
- working directory. It can be the root repository directory or any subdirectory
18
- in case you have a single repository for more than one project or are restricted
19
- to commit into a subdirectory.
20
-
21
11
:::{.alert .alert-info}
22
12
** Note**
23
13
@@ -48,7 +38,9 @@ tag-prefix: '[abc]'
48
38
49
39
The built-in configuration for the ` GitFlow` workflow (`workflow: GitFlow/v1`) looks like:
50
40
51
- ` ` ` yaml
41
+ <!-- snippet : /docs/workflows/GitFlow/v1.yml -->
42
+ <a id='snippet-/docs/workflows/GitFlow/v1.yml'></a>
43
+ ` ` ` yml
52
44
assembly-versioning-scheme: MajorMinorPatch
53
45
assembly-file-versioning-scheme: MajorMinorPatch
54
46
tag-prefix: '[vV]?'
@@ -217,10 +209,14 @@ tracks-release-branches: false
217
209
is-release-branch: false
218
210
is-main-branch: false
219
211
` ` `
212
+ <sup><a href='/docs/workflows/GitFlow/v1.yml#L1-L167' title='Snippet source file'>snippet source</a> | <a href='#snippet-/docs/workflows/GitFlow/v1.yml' title='Start of snippet'>anchor</a></sup>
213
+ <!-- endSnippet -->
220
214
221
215
The supported built-in configuration for the `GitHubFlow` workflow (`workflow : GitHubFlow/v1`) looks like:
222
216
223
- ` ` ` yaml
217
+ <!-- snippet : /docs/workflows/GitHubFlow/v1.yml -->
218
+ <a id='snippet-/docs/workflows/GitHubFlow/v1.yml'></a>
219
+ ` ` ` yml
224
220
assembly-versioning-scheme: MajorMinorPatch
225
221
assembly-file-versioning-scheme: MajorMinorPatch
226
222
tag-prefix: '[vV]?'
@@ -280,12 +276,12 @@ branches:
280
276
increment: Inherit
281
277
prevent-increment:
282
278
when-current-commit-tagged: false
279
+ track-merge-message: true
283
280
regex: ^features?[/-](?<BranchName>.+)
284
281
source-branches:
285
282
- main
286
283
- release
287
284
is-source-branch-for: []
288
- track-merge-message: true
289
285
is-main-branch: false
290
286
pre-release-weight: 30000
291
287
pull-request:
@@ -296,28 +292,28 @@ branches:
296
292
of-merged-branch: true
297
293
when-current-commit-tagged: false
298
294
label-number-pattern: '[/-](?<number>\d +)'
295
+ track-merge-message: true
299
296
regex: ^(pull|pull\- requests|pr)[/-]
300
297
source-branches:
301
298
- main
302
299
- release
303
300
- feature
304
301
is-source-branch-for: []
305
- track-merge-message: true
306
302
pre-release-weight: 30000
307
303
unknown:
308
304
mode: ManualDeployment
309
305
label: '{BranchName}'
310
306
increment: Inherit
311
307
prevent-increment:
312
308
when-current-commit-tagged: false
309
+ track-merge-message: false
313
310
regex: (?<BranchName>.+)
314
311
source-branches:
315
312
- main
316
313
- release
317
314
- feature
318
315
- pull-request
319
316
is-source-branch-for: []
320
- track-merge-message: false
321
317
is-main-branch: false
322
318
ignore:
323
319
sha: []
@@ -338,10 +334,14 @@ tracks-release-branches: false
338
334
is-release-branch: false
339
335
is-main-branch: false
340
336
` ` `
337
+ <sup><a href='/docs/workflows/GitHubFlow/v1.yml#L1-L116' title='Snippet source file'>snippet source</a> | <a href='#snippet-/docs/workflows/GitHubFlow/v1.yml' title='Start of snippet'>anchor</a></sup>
338
+ <!-- endSnippet -->
341
339
342
340
The preview built-in configuration (experimental usage only) for the `TrunkBased` workflow (`workflow : TrunkBased/preview1`) looks like:
343
341
344
- ` ` ` yaml
342
+ <!-- snippet : /docs/workflows/TrunkBased/preview1.yml -->
343
+ <a id='snippet-/docs/workflows/TrunkBased/preview1.yml'></a>
344
+ ` ` ` yml
345
345
assembly-versioning-scheme: MajorMinorPatch
346
346
assembly-file-versioning-scheme: MajorMinorPatch
347
347
tag-prefix: '[vV]?'
@@ -356,55 +356,74 @@ merge-message-formats: {}
356
356
update-build-number: true
357
357
semantic-version-format: Strict
358
358
strategies:
359
- - Mainline
360
359
- ConfiguredNextVersion
360
+ - Mainline
361
361
branches:
362
362
main:
363
363
mode: ContinuousDeployment
364
364
label: ''
365
365
increment: Patch
366
366
prevent-increment:
367
367
of-merged-branch: true
368
- when-current-commit-tagged: true
369
368
track-merge-target: false
369
+ track-merge-message: true
370
370
regex: ^master$|^main$
371
371
source-branches: []
372
+ is-source-branch-for: []
372
373
tracks-release-branches: false
373
374
is-release-branch: false
374
375
is-main-branch: true
375
376
pre-release-weight: 55000
376
377
feature:
378
+ mode: ContinuousDelivery
379
+ label: '{BranchName}'
377
380
increment: Minor
378
- regex: ^features?[/-](?<BranchName>.+)
379
381
prevent-increment:
380
382
when-current-commit-tagged: false
383
+ track-merge-message: true
384
+ regex: ^features?[/-](?<BranchName>.+)
381
385
source-branches:
382
386
- main
387
+ is-source-branch-for: []
388
+ is-main-branch: false
383
389
pre-release-weight: 30000
384
390
hotfix:
391
+ mode: ContinuousDelivery
392
+ label: '{BranchName}'
385
393
increment: Patch
386
- regex: ^hotfix(es)?[/-](?<BranchName>.+)
387
394
prevent-increment:
388
395
when-current-commit-tagged: false
396
+ regex: ^hotfix(es)?[/-](?<BranchName>.+)
389
397
source-branches:
390
398
- main
399
+ is-source-branch-for: []
400
+ is-release-branch: true
401
+ is-main-branch: false
391
402
pre-release-weight: 30000
392
403
pull-request:
393
404
mode: ContinuousDelivery
394
405
label: PullRequest
395
406
increment: Inherit
407
+ prevent-increment:
408
+ of-merged-branch: true
409
+ when-current-commit-tagged: false
396
410
label-number-pattern: '[/-](?<number>\d +)'
411
+ track-merge-message: true
397
412
regex: ^(pull|pull\- requests|pr)[/-]
398
413
source-branches:
399
414
- main
415
+ - feature
416
+ - hotfix
417
+ is-source-branch-for: []
400
418
pre-release-weight: 30000
401
419
unknown:
402
420
increment: Patch
403
- regex: (?<BranchName>.+)
404
421
prevent-increment:
405
422
when-current-commit-tagged: false
423
+ regex: (?<BranchName>.+)
406
424
source-branches:
407
425
- main
426
+ is-source-branch-for: []
408
427
pre-release-weight: 30000
409
428
ignore:
410
429
sha: []
@@ -419,10 +438,14 @@ track-merge-target: false
419
438
track-merge-message: true
420
439
commit-message-incrementing: Enabled
421
440
regex: ''
441
+ source-branches: []
442
+ is-source-branch-for: []
422
443
tracks-release-branches: false
423
444
is-release-branch: false
424
445
is-main-branch: false
425
446
` ` `
447
+ <sup><a href='/docs/workflows/TrunkBased/preview1.yml#L1-L101' title='Snippet source file'>snippet source</a> | <a href='#snippet-/docs/workflows/TrunkBased/preview1.yml' title='Start of snippet'>anchor</a></sup>
448
+ <!-- endSnippet -->
426
449
427
450
The details of the available options are as follows :
428
451
0 commit comments