Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion docs/input/docs/reference/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,28 @@ branch. For example `develop` → `release/1.0.0` → merge into `main` and tag

### tracks-release-branches

Indicates this branch config represents develop in GitFlow.
Controls whether this branch tracks release branches when calculating its version.
This is typically enabled for `develop` in GitFlow.

With the `TrackReleaseBranches` strategy enabled, a release branch's version is
taken from its name. If the name contains no version, GitVersion uses the highest
semantic prerelease tag matching that release branch's [configured label](#label). Matching
is case-insensitive. Tags must be on the release branch's first-parent history,
outside the first-parent history of configured `main` branches. A release tag
remains eligible when its commit is merged into `main` through a merge commit.
Like versioned release names, tags are evaluated against the current release
refs, including when versioning an older commit. Tags on newer sibling release
commits are eligible; advancing the tracking branch alone does not change tag eligibility.
This does not reconstruct historical branch or tag state. [Tag prefix](#tag-prefix),
[semantic version format](#semantic-version-format), and [ignore](#ignore) settings apply.
The release branch must share an ancestor with the commit being versioned.

For example, with release label `rc`, `releases/R2301` tagged `1.0.0-RC.1` lets
`develop` advance to `1.1.0-beta.1` after its next commit when `develop`'s label is
`beta`. Versioned release names retain precedence over tags within this strategy.
Git does not record which branch created a tag; first-parent history and the
release label determine eligibility, including when the tracking branch
(typically `develop`) was branched from the tagged release commit.

### commit-date-format

Expand Down
23 changes: 22 additions & 1 deletion docs/input/docs/reference/mdsource/configuration.source.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,28 @@ branch. For example `develop` → `release/1.0.0` → merge into `main` and tag

### tracks-release-branches

Indicates this branch config represents develop in GitFlow.
Controls whether this branch tracks release branches when calculating its version.
This is typically enabled for `develop` in GitFlow.

With the `TrackReleaseBranches` strategy enabled, a release branch's version is
taken from its name. If the name contains no version, GitVersion uses the highest
semantic prerelease tag matching that release branch's [configured label](#label). Matching
is case-insensitive. Tags must be on the release branch's first-parent history,
outside the first-parent history of configured `main` branches. A release tag
remains eligible when its commit is merged into `main` through a merge commit.
Like versioned release names, tags are evaluated against the current release
refs, including when versioning an older commit. Tags on newer sibling release
commits are eligible; advancing the tracking branch alone does not change tag eligibility.
This does not reconstruct historical branch or tag state. [Tag prefix](#tag-prefix),
[semantic version format](#semantic-version-format), and [ignore](#ignore) settings apply.
The release branch must share an ancestor with the commit being versioned.

For example, with release label `rc`, `releases/R2301` tagged `1.0.0-RC.1` lets
`develop` advance to `1.1.0-beta.1` after its next commit when `develop`'s label is
`beta`. Versioned release names retain precedence over tags within this strategy.
Git does not record which branch created a tag; first-parent history and the
release label determine eligibility, including when the tracking branch
(typically `develop`) was branched from the tagged release commit.

### commit-date-format

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,8 @@ public void EnsureBugFixWithDevelopBranch(bool useMainline)
fixture.MergeNoFF("hotfix/foo");

// ✅ succeeds as expected
fixture.AssertFullSemver("0.1.0-PullRequest2.5", configuration);
// Release tracking now recognizes the hotfix tag and counts from its branch point.
fixture.AssertFullSemver(useMainline ? "0.1.0-PullRequest2.5" : "0.1.0-PullRequest2.4", configuration);

fixture.Checkout("main");
fixture.BranchTo("pull/3/merge");
Expand Down
Loading
Loading