"Git fatal: ref HEAD is not a symbolic ref" while using maven release plugin
Solution 1:
I ran into the same error on Jenkins in combination with maven release plugin, we fixed it by going to Additional behaviours, Check out to specific local branch and enter 'master'
I realise this is not a solution but it might give you some direction in where to look.
Solution 2:
For Jenkins and GIT add the additional behaviour check out to specific local branch
and use the Workspace Cleanup Plugin
to clean your workspace to the beginning of your CI job.
Solution 3:
The problem in Atlassian Bamboo was solved by un-checking the default setting Use shallow clones
with description Fetches the shallowest commit history possible. Do not use if your build depends on full repository history
. This checkbox is located under Plan Configuration -> Repositories tab -> Git -> Advanced options
After this all the releases work fine.