I see the same thing. By default, the workspace is in (no branch).
If I manually run
mvn -X -B -f /[jenkins]/jobs/[job]/workspace/pom.xml -Dresume=false release:prepare release:perform
.. it ends with a
org.apache.maven.scm.ScmException: Detecting the current branch failed: fatal: ref HEAD is not a symbolic ref
If I first do a 'git checkout master', and then repeat the command it works fine.
Back in Jenkins, I then configured the job's - SCM section with Branch Specifier: "master", and under Advanced I entered Checkout/merge to local branch (optional): "master"
After that it works fine. Still, it's a bit annoying that it didn't work by default. I don't know if this is the fault of the maven-release-plugin (should it be possible to make a release when not on a branch?).. but not having to configure this for each job would be nice.