Jenkinspipline Git SCM checkout with multiple branches

Viewed 1587

I see in the Jenkins Pipeline SCM Step documentation that multiple branches can be passed into the checkout step: https://www.jenkins.io/doc/pipeline/steps/workflow-scm-step/#checkout-general-scm

e.g.

checkout([$class: 'GitSCM', 
    branches: [[name: 'release-1.2'], [name: 'master']], 
    doGenerateSubmoduleConfigurations: false, 
    extensions: [], 
    submoduleCfg: [], 
    userRemoteConfigs: [[]]
])

What does that actually mean passing multiple branches in git terms since only one branch can be checked out at a time? Above documentation does not elaborate on that detail.

0 Answers
Related