“Git fatal: ref HEAD is not a symbolic ref” while using maven release plugin

后端 未结 10 681
后悔当初
后悔当初 2020-12-23 02:58

I get the following error output while running the Maven release plugin prepare step i.e. mvn release:prepare --batch-mode -DreleaseVersion=1.1.2 -DdevelopmentVersion=

10条回答
  •  情深已故
    2020-12-23 03:13

    I am using a Jenkins Team Project with a Multibranch Project Setup.

    I previously used checkout scm command.

    Now I am using the following code:

    checkout([
                     $class: 'GitSCM',
                     branches: scm.branches,
                     extensions: scm.extensions + [[$class: 'CleanCheckout'], [$class: 'LocalBranch', localBranch: 'new']],
                     userRemoteConfigs: scm.userRemoteConfigs
                ])
    

提交回复
热议问题