Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Pipeline depth specification in YAML file seems to be ignored


I am trying to get the BitBucket pipeline to shallow clone my repository. My file looks like this:



depth: 1


 When I look at the pipeline build log, the git clone command does not include "--depth 1". Have I got the YAML layout above wrong?

2 answers

I'm running in the same issue.

Are there common hints to take into account or would you open a support ticket for me?


0 votes
Daniel Santos
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jun 13, 2019

Hi @James Hume,

I believe you are facing some edge case or bug.
I was not able to reproduce this scenario.

When I browse the pipelines logs I see this in the first part of it:

Build setup (section)

+ umask 000
+ GIT_LFS_SKIP_SMUDGE=1 git clone --branch="master" --depth 1 https://x-token-auth:$$BITBUCKET_REPO_FULL_NAME.git $BUILD_DIR
Cloning into '/opt/atlassian/pipelines/agent/build'...

As you can see the "--depth 1" is there.

We'll probably need to create a ticket for you to allow us to investigate this case deeper and understand what is happening there.

Some questions to narrow down this one:

  • Are you manually running the git commands from a script task or are you talking about the automatic checkout that happens in the build setup section?
  • Is this feature working as expected for other repositories with different bitbucket-pipelines.yml (in case you have them)?

Hi @Daniel Santos , thanks for your reply.

To answer your questions:

* The git clone is being run automatically by the build setup section.

* We haven't used this feature before, so couldn't say.


Any ideas would be much appreciated, thanks.

Daniel Santos
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jun 18, 2019

Hey @James Hume

I've opened a ticket in the Bitbucket Cloud support to allow us investigating this one deeply. We will need to check your repository to understand what is causing this issue. You should receive an email with the support ticket soon.

Once the issue is resolved, please share your findings here. This will allow other users to learn from your experience. 

Thank you!

Not sure if this helps:


It seems that the `depth` flag is also not honoured in pull-requests pipelines.

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events