current Git branch is HEAD detached at


When you try to tagging or pulling your code Git said some thing like :

current Git branch is HEAD detached at 0ff123e


  • CloudBees Jenkins Enterprise
  • Git Plugin


The default behaviour when you do a checkout from a commit is detached so, after checkout you need to attach to branch with a checkout command in a shell step.

 git checkout ${BRANCH_NAME}

from git checkout documentation


Rather than checking out a branch to work on it, check out a commit for inspection and discardable experiments. This is the default behavior of "git checkout <commit>" when <commit> is not a branch name. See the "DETACHED HEAD" section below for details.

Have more questions?


Please sign in to leave a comment.