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/input/docs/reference/configuration.md
+14-3Lines changed: 14 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -628,28 +628,38 @@ Date and time in the format `yyyy-MM-ddTHH:mm:ss` (eg `commits-before:
628
628
`commits-before`will be ignored.
629
629
630
630
#### paths
631
+
631
632
A sequence of regular expressions that represent paths in the repository. Commits that modify these paths will be excluded from version calculations. For example, to filter out commits that belong to `docs`:
633
+
632
634
```yaml
633
635
ignore:
634
636
paths:
635
637
- ^docs\/
636
638
```
639
+
637
640
##### *Monorepo*
641
+
638
642
This ignore config can be used to filter only those commits that belong to a specific project in a monorepo.
639
643
As an example, consider a monorepo consisting of subdirectories for `ProjectA`, `ProjectB` and a shared `LibraryC`. For GitVersion to consider only commits that are part of `projectA` and shared library `LibraryC`, a regex that matches all paths except those starting with `ProjectA` or `LibraryC` can be used. Either one of the following configs would filter out `ProjectB`.
644
+
640
645
* Specific match on `/ProjectB/*`:
646
+
641
647
```yaml
642
648
ignore:
643
649
paths:
644
650
- `^\/ProductB\/.*`
645
651
```
652
+
646
653
* Negative lookahead on anything other than `/ProjectA/*` and `/LibraryC/*`:
654
+
647
655
```yaml
648
656
ignore:
649
657
paths:
650
658
- `^(?!\/ProductA\/|\/LibraryC\/).*`
651
659
```
660
+
652
661
A commit having changes only in `/ProjectB/*` path would be ignored. A commit having changes in the following paths wouldn't be ignored:
662
+
653
663
* `/ProductA/*`
654
664
* `/LibraryC/*`
655
665
* `/ProductA/*` and `/LibraryC/*`
@@ -658,7 +668,8 @@ A commit having changes only in `/ProjectB/*` path would be ignored. A commit ha
658
668
* `/ProductA/*` and `/ProductB/*` and `/LibraryC/*`
659
669
660
670
:::
661
-
Note: The `ignore.paths` configuration is case-sensitive. This can lead to unexpected behavior on case-insensitive file systems, such as Windows. To ensure consistent matching regardless of case, you can prefix your regular expressions with the case-insensitive flag `(?i)`. For example, `(?i)^docs\/` will match both `docs/` and `Docs/`.
671
+
Note: The `ignore.paths` configuration is case-sensitive.
672
+
This can lead to unexpected behavior on case-insensitive file systems, such as Windows. To ensure consistent matching regardless of case, you can prefix your regular expressions with the case-insensitive flag `(?i)`. For example, `(?i)^docs\/` will match both `docs/` and `Docs/`.
662
673
:::
663
674
664
675
::: {.alert .alert-warning}
@@ -683,7 +694,7 @@ The regular expression should contain the following capture groups:
683
694
* `TargetBranch` - Identifies the target branch of the merge
684
695
* `PullRequestNumber` - Captures the pull-request number
685
696
686
-
Custom merge message formats are evaluated _before_ any built in formats.
697
+
Custom merge message formats are evaluated *before* any built in formats.
687
698
Support for [Conventional Commits][conventional-commits] can be
688
699
[configured][conventional-commits-config].
689
700
@@ -950,7 +961,7 @@ branches:
950
961
951
962
Strategy which will look for tagged merge commits directly off the current
952
963
branch. For example `develop` → `release/1.0.0` → merge into `main` and tag
953
-
`1.0.0`. The tag is _not_ on develop, but develop should be version `1.0.0` now.
964
+
`1.0.0`. The tag is *not* on develop, but develop should be version `1.0.0` now.
Copy file name to clipboardExpand all lines: docs/input/docs/reference/mdsource/configuration.source.md
+14-3Lines changed: 14 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -229,28 +229,38 @@ Date and time in the format `yyyy-MM-ddTHH:mm:ss` (eg `commits-before:
229
229
`commits-before`will be ignored.
230
230
231
231
#### paths
232
+
232
233
A sequence of regular expressions that represent paths in the repository. Commits that modify these paths will be excluded from version calculations. For example, to filter out commits that belong to `docs`:
234
+
233
235
```yaml
234
236
ignore:
235
237
paths:
236
238
- ^docs\/
237
239
```
240
+
238
241
##### *Monorepo*
242
+
239
243
This ignore config can be used to filter only those commits that belong to a specific project in a monorepo.
240
244
As an example, consider a monorepo consisting of subdirectories for `ProjectA`, `ProjectB` and a shared `LibraryC`. For GitVersion to consider only commits that are part of `projectA` and shared library `LibraryC`, a regex that matches all paths except those starting with `ProjectA` or `LibraryC` can be used. Either one of the following configs would filter out `ProjectB`.
245
+
241
246
* Specific match on `/ProjectB/*`:
247
+
242
248
```yaml
243
249
ignore:
244
250
paths:
245
251
- `^\/ProductB\/.*`
246
252
```
253
+
247
254
* Negative lookahead on anything other than `/ProjectA/*` and `/LibraryC/*`:
255
+
248
256
```yaml
249
257
ignore:
250
258
paths:
251
259
- `^(?!\/ProductA\/|\/LibraryC\/).*`
252
260
```
261
+
253
262
A commit having changes only in `/ProjectB/*` path would be ignored. A commit having changes in the following paths wouldn't be ignored:
263
+
254
264
* `/ProductA/*`
255
265
* `/LibraryC/*`
256
266
* `/ProductA/*` and `/LibraryC/*`
@@ -259,7 +269,8 @@ A commit having changes only in `/ProjectB/*` path would be ignored. A commit ha
259
269
* `/ProductA/*` and `/ProductB/*` and `/LibraryC/*`
260
270
261
271
:::
262
-
Note: The `ignore.paths` configuration is case-sensitive. This can lead to unexpected behavior on case-insensitive file systems, such as Windows. To ensure consistent matching regardless of case, you can prefix your regular expressions with the case-insensitive flag `(?i)`. For example, `(?i)^docs\/` will match both `docs/` and `Docs/`.
272
+
Note: The `ignore.paths` configuration is case-sensitive.
273
+
This can lead to unexpected behavior on case-insensitive file systems, such as Windows. To ensure consistent matching regardless of case, you can prefix your regular expressions with the case-insensitive flag `(?i)`. For example, `(?i)^docs\/` will match both `docs/` and `Docs/`.
263
274
:::
264
275
265
276
::: {.alert .alert-warning}
@@ -284,7 +295,7 @@ The regular expression should contain the following capture groups:
284
295
* `TargetBranch` - Identifies the target branch of the merge
285
296
* `PullRequestNumber` - Captures the pull-request number
286
297
287
-
Custom merge message formats are evaluated _before_ any built in formats.
298
+
Custom merge message formats are evaluated *before* any built in formats.
288
299
Support for [Conventional Commits][conventional-commits] can be
289
300
[configured][conventional-commits-config].
290
301
@@ -551,7 +562,7 @@ branches:
551
562
552
563
Strategy which will look for tagged merge commits directly off the current
553
564
branch. For example `develop` → `release/1.0.0` → merge into `main` and tag
554
-
`1.0.0`. The tag is _not_ on develop, but develop should be version `1.0.0` now.
565
+
`1.0.0`. The tag is *not* on develop, but develop should be version `1.0.0` now.
0 commit comments