Two instances of git checkout show up on build summary page

I setup the job configuration in the UI for a multibranch pipeline. I Put in the bitbucket credentials, etc.

My jenkinsfile looks like this:

stages {
stage(‘source’) {
steps {
git branch: BRANCH_NAME, credentialsId: ‘myuser’, url: ‘hXtps://svn.example .com/bitbucket/scm/code/code.git’
}
}

The Build Summary page shows:

Changes
Update Jenkinsfile (details / bitbucketserver)

Changes
Update Jenkinsfile (details)

Branch event at 1:50:58 PM on Jan 17, 2024
Revision: XXX
Repository: hXtps://myuser@svn.example .com/bitbucket/scm/code/code.git

refs/remotes/origin/X

SCM: git hXtps://myuser@svn.example .com/bitbucket/scm/code/code.git

Commits since last build: 1
Latest commit: X

Revision: XXX
Repository: hXtps://svn.example .com/bitbucket/scm/code/code.git

refs/remotes/origin/X

SCM: git hXtps://svn.example .com/bitbucket/scm/code/code.git

Commits since last build: 1
Latest commit: X

Why is it duplicated?

Declarative Pipelines that are executed from SCM include an implicit checkout step. The additional git Pipeline command is redundant unless you’ve set the skipDefaultCheckout option. Darin Pope has a 3 minute video that describes it.

1 Like

Thank you! This is exactly what I was looking for.