Skip to content

Instantly share code, notes, and snippets.

@object
Created October 11, 2021 10:53
Show Gist options
  • Select an option

  • Save object/3c7d4d27481207394faceecaea780403 to your computer and use it in GitHub Desktop.

Select an option

Save object/3c7d4d27481207394faceecaea780403 to your computer and use it in GitHub Desktop.
Gitversion could not determine which branch to treat as the development branch
[12:26:44][Step 2/21] Starting: C:\Windows\system32\cmd.exe /c dotnet gitversion /output buildserver /b refs/heads/use-gitversion
[12:26:44][Step 2/21] in directory: C:\BuildAgent\work\3f54bead41b5db4e
[12:26:44][Step 2/21] INFO [10/11/21 12:26:44:57] Working directory: C:\BuildAgent\work\3f54bead41b5db4e
[12:26:44][Step 2/21] INFO [10/11/21 12:26:44:59] Branch from build environment: 9c96c02dabd37958ecc9c267f6ed27d75decf286
[12:26:44][Step 2/21] INFO [10/11/21 12:26:44:59] Project root is: C:\BuildAgent\work\3f54bead41b5db4e\
[12:26:44][Step 2/21] INFO [10/11/21 12:26:44:59] DotGit directory is: C:\BuildAgent\work\3f54bead41b5db4e\.git
[12:26:44][Step 2/21] INFO [10/11/21 12:26:44:60] Begin: Normalizing git directory for branch '9c96c02dabd37958ecc9c267f6ed27d75decf286'
[12:26:44][Step 2/21] INFO [10/11/21 12:26:44:63] One remote found (origin -> 'https://github.com/nrkno/distribution-oddjob').
[12:26:44][Step 2/21] INFO [10/11/21 12:26:44:63] Skipping fetching, if GitVersion does not calculate your version as expected you might need to allow fetching or use dynamic repositories
[12:26:44][Step 2/21] INFO [10/11/21 12:26:44:64] Creating local branch 9c96c02dabd37958ecc9c267f6ed27d75decf286 pointing at 9c96c02
[12:26:44][Step 2/21] INFO [10/11/21 12:26:44:68] Skipping update of 'refs/remotes/origin/use-gitversion' as it already matches the remote ref.
[12:26:44][Step 2/21] INFO [10/11/21 12:26:44:69] HEAD points at branch 'refs/heads/9c96c02dabd37958ecc9c267f6ed27d75decf286'.
[12:26:44][Step 2/21] INFO [10/11/21 12:26:44:69] End: Normalizing git directory for branch '9c96c02dabd37958ecc9c267f6ed27d75decf286' (Took: 90.53ms)
[12:26:44][Step 2/21] INFO [10/11/21 12:26:44:70] Begin: Loading version variables from disk cache
[12:26:44][Step 2/21] INFO [10/11/21 12:26:44:70] Cache file C:\BuildAgent\work\3f54bead41b5db4e\.git\gitversion_cache\E9EB3191B660377628ECC31D773069E9E4E5E326.yml not found.
[12:26:44][Step 2/21] INFO [10/11/21 12:26:44:70] End: Loading version variables from disk cache (Took: 0.37ms)
[12:26:44][Step 2/21] INFO [10/11/21 12:26:44:79] Using latest commit on specified branch
[12:26:44][Step 2/21] INFO [10/11/21 12:26:44:79] No branch configuration found for branch use-gitversion, falling back to default configuration
[12:26:44][Step 2/21] INFO [10/11/21 12:26:44:80] Begin: Attempting to inherit branch configuration from parent branch
[12:26:44][Step 2/21] INFO [10/11/21 12:26:44:80] Begin: Finding branch source of 'use-gitversion'
[12:26:44][Step 2/21] INFO [10/11/21 12:26:44:81] End: Finding branch source of 'use-gitversion' (Took: 7.00ms)
[12:26:44][Step 2/21] INFO [10/11/21 12:26:44:81] Begin: Getting branches containing the commit '9c96c02'.
[12:26:44][Step 2/21] INFO [10/11/21 12:26:44:81] Trying to find direct branches.
[12:26:44][Step 2/21] INFO [10/11/21 12:26:44:81] No direct branches found, searching through all branches.
[12:26:44][Step 2/21] INFO [10/11/21 12:26:44:81] End: Getting branches containing the commit '9c96c02'. (Took: 0.14ms)
[12:26:44][Step 2/21] INFO [10/11/21 12:26:44:81] Found possible parent branches:
[12:26:44][Step 2/21] INFO [10/11/21 12:26:44:81] End: Attempting to inherit branch configuration from parent branch (Took: 15.88ms)
[12:26:44][Step 2/21] INFO [10/11/21 12:26:44:84] Attempting to show the current git graph (please include in issue):
[12:26:44][Step 2/21] ERROR [10/11/21 12:26:44:84] An unexpected error occurred:
[12:26:44][Step 2/21] INFO [10/11/21 12:26:44:84] Showing max of 100 commits
[12:26:44][Step 2/21] System.InvalidOperationException: Gitversion could not determine which branch to treat as the development branch (default is 'develop') nor releaseable branch (default is 'main' or 'master'), either locally or remotely. Ensure the local clone and checkout match the requirements or considering using 'GitVersion Dynamic Repositories'
[12:26:44][Step 2/21] at GitVersion.Configuration.BranchConfigurationCalculator.InheritBranchConfiguration(IBranch targetBranch, BranchConfig branchConfiguration, ICommit currentCommit, Config configuration, IList`1 excludedInheritBranches) in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Configuration\BranchConfigurationCalculator.cs:line 135
[12:26:44][Step 2/21] at GitVersion.Configuration.BranchConfigurationCalculator.GetBranchConfiguration(IBranch targetBranch, ICommit currentCommit, Config configuration, IList`1 excludedInheritBranches) in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Configuration\BranchConfigurationCalculator.cs:line 47
[12:26:44][Step 2/21] at GitVersion.GitVersionContextFactory.Create(GitVersionOptions gitVersionOptions) in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Core\GitVersionContextFactory.cs:line 40
[12:26:44][Step 2/21] at GitVersion.GitVersionCoreModule.<>c__DisplayClass0_0.<RegisterTypes>b__1() in D:\a\GitVersion\GitVersion\src\GitVersion.Core\GitVersionCoreModule.cs:line 38
[12:26:44][Step 2/21] at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
[12:26:44][Step 2/21] at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
[12:26:44][Step 2/21] at System.Lazy`1.CreateValue()
[12:26:44][Step 2/21] at System.Lazy`1.get_Value()
[12:26:44][Step 2/21] at GitVersion.VersionCalculation.NextVersionCalculator.get_context() in D:\a\GitVersion\GitVersion\src\GitVersion.Core\VersionCalculation\NextVersionCalculator.cs:line 17
[12:26:44][Step 2/21] at GitVersion.VersionCalculation.NextVersionCalculator.FindVersion() in D:\a\GitVersion\GitVersion\src\GitVersion.Core\VersionCalculation\NextVersionCalculator.cs:line 32
[12:26:44][Step 2/21] at GitVersion.GitVersionCalculateTool.CalculateVersionVariables() in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Core\GitVersionCalculateTool.cs:line 52
[12:26:44][Step 2/21] at GitVersion.GitVersionExecutor.RunGitVersionTool(GitVersionOptions gitVersionOptions) in D:\a\GitVersion\GitVersion\src\GitVersion.App\GitVersionExecutor.cs:line 70
[12:26:44][Step 2/21] INFO [10/11/21 12:26:44:93] * 9c96c02d 2 hours ago (HEAD -> 9c96c02dabd37958ecc9c267f6ed27d75decf286, origin/use-gitversion, use-gitversion)
[12:26:44][Step 2/21] * e55da058 2 hours ago
[12:26:44][Step 2/21] * 39f628fa 2 hours ago
[12:26:44][Step 2/21] * 0258c6d3 3 days ago
[12:26:44][Step 2/21] * ce5a7f24 3 days ago
[12:26:44][Step 2/21] * 4181851c 3 days ago (tag: 2.5.7317)
[12:26:44][Step 2/21] * e7684358 3 days ago
[12:26:44][Step 2/21] * 7f333899 3 days ago
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment