Skip to content

GitVersion creates branch named after SHA1 #1234

@xlegalles

Description

@xlegalles

I first thought it was a TeamCity bug but it may not: in one single repository from 15, we always get a report from GitVersion that uses a commit sha as the branch name i.e. a detached head. I simply added a "git branch" step before and after the gitversion one and I have to admit the evidence

  • before I get "develop"
  • the GitVersion reports a current branch 3427875e403aa2b52ea983528e765c22c17ab41a
  • after I get effectively "3427875e403aa2b52ea983528e765c22c17ab41a"
    So, yes, before GitVersion we have the right branch but as soon as GitVersion is executed, we get a detached head.
    Of course, I have traced the vcs logs from TeamCity and there is nothing but a normal checkout of the current branch (i.e. develop)

Any idea?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions