question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

GitVersion has a bug, your HEAD has moved after repo normalisation.

See original GitHub issue

We have a peculiar issue that keeps happening on one specific commit, that is not at the tip of our branch. The latest commit in this branch does not exhibit the issue (so we’re past it). I’m creating this issue because it might show some other problem you guys have (and because the exception told me to).

$ --- equivalent of dotnet-gitversion ---
GitVersion has a bug, your HEAD has moved after repo normalisation.

To disable this error set an environmental variable called IGNORE_NORMALISATION_GIT_HEAD_MOVE to 1

Please run `git log --graph --format="%h %cr %d" --decorate --date=relative --all --remotes=* -n 100` and submit it along with your build log (with personal info removed) in a new issue at https://github.com/GitTools/GitVersion
   at GitVersion.GitRepositoryHelper.NormalizeGitDirectory(String gitDirectory, AuthenticationInfo authentication, Boolean noFetch, String currentBranch)
   at GitVersion.GitPreparer.Initialise(Boolean normaliseGitDirectory, String currentBranch, Boolean shouldCleanUpRemotes)
   at GitVersion.ExecuteCore.ExecuteGitVersion(String targetUrl, String dynamicRepositoryLocation, Authentication authentication, String targetBranch, Boolean noFetch, String workingDirectory, String commitId, Config overrideConfig, Boolean noCache)
   at BuildLib.Tasks.ArtBuildTasks.DetermineVersionInfo(ChronosBuildBase buildBase) in C:\Project\Builder\BuildTasks.cs:line 27
   at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
   at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
   at System.Lazy`1.CreateValue()
   at BuildLib.Bases.ChronosBuildBase.<get_GenerateVersionInfo>b__40_1() in C:\Project\Builder\BuildBase.cs:line 118
   at System.Collections.Generic.List`1.ForEach(Action`1 action)
   at Nuke.Common.Execution.BuildExecutor.Execute(NukeBuild build, IEnumerable`1 executionList)
   at Nuke.Common.Execution.BuildExecutor.Execute[T](Expression`1 defaultTargetExpression)

Output of git log --graph --format="%h %cr %d" --decorate --date=relative --all --remotes=* -n 100: git-152228.txt

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:18 (11 by maintainers)

github_iconTop GitHub Comments

9reactions
stale[bot]commented, Nov 4, 2019

This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. Thank you for your contributions.

5reactions
stale[bot]commented, Jun 29, 2019

This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - What does the environment variable ...
GitVersion.BugException: GitVersion has a bug, your HEAD has moved after repo normalisation. To disable this error set an environmental ...
Read more >
GitVersion and TeamCity - Alan's Blog - WordPress.com
Core has a bug, your HEAD has moved after repo normalisation” error, fixed by adding an environment variable parameter to the build config ......
Read more >
GitLab CI
Implements GitVersion as a single job that runs the GitVersion container and passes the version number downstream into both pipeline and job level...
Read more >
What to Do if GitVersion Does Not Recognise Your Main Branch
After we switched to main as the default branch, our build failed with this error message: ERROR [****] An unexpected error occurred: System....
Read more >
GitVersion
GitVersion looks at your git history and works out the Semantic Version of the commit being built. Build status codecov Gitter. Artifact, Stable....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found