diff --git a/src/NerdBank.GitVersioning/CloudBuildServices/BitbucketCloud.cs b/src/NerdBank.GitVersioning/CloudBuildServices/BitbucketCloud.cs
index ea4592fd7..087fba80d 100644
--- a/src/NerdBank.GitVersioning/CloudBuildServices/BitbucketCloud.cs
+++ b/src/NerdBank.GitVersioning/CloudBuildServices/BitbucketCloud.cs
@@ -20,10 +20,10 @@ public class BitbucketCloud : ICloudBuild
public bool IsPullRequest => !string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("BITBUCKET_PR_ID"));
///
- public string BuildingBranch => Environment.GetEnvironmentVariable("BITBUCKET_BRANCH");
+ public string BuildingBranch => CloudBuild.ShouldStartWith(Environment.GetEnvironmentVariable("BITBUCKET_BRANCH"), "refs/heads/");
///
- public string BuildingTag => Environment.GetEnvironmentVariable("BITBUCKET_TAG");
+ public string BuildingTag => CloudBuild.ShouldStartWith(Environment.GetEnvironmentVariable("BITBUCKET_TAG"), "refs/tags/");
///
public string GitCommitId => Environment.GetEnvironmentVariable("BITBUCKET_COMMIT");