I have a Jenkins Multi branch job that checks out and builds code from GitLab. Until recently it was working without issue but now some (but not all) branches from the good master fail to build. Master always builds without issue. When I branch master either from the repo in GitLab or via a git checkout -b locally and push back to Gitlab and then allow the multibranch job to pick up the new branch it fails to build it. I get the message from the pipeline plugin SCMBinder class: "Could not determine exact tip revision of [branch]; falling back to nondeterministic checkout". When I do a git status in the workspace on either master or a slave the Head is detached. When I git clone the code locally and checkout the branch everything is fine and the head is properly attached. Additionally, when I create a simple pipeline job in Jenkins with the problem branch it builds ok and inspection of the workspace shows the head attached. I have upgraded Jenkins and the plugins but this has not helped.
The confusing thing is that I have some other branches I created from the same master that builds perfectly fine in the same multibranch pipeline job. Also if I branch a good branch then I get the same issue in the multibranch pipeline.
Can anyone suggest what is going wrong?