You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I have the following scenario:
Whenever file A changes in branch 'develop', I want to copy these changes to branch 'main'.
I added a step to my pipeline which triggers whenever file A changes in branch 'develop', but apparently Bitbucket only clones the triggering branch, so 'main' is not available in the pipeline.
I have tried to fetch, pull, checkout -b, etc. but to no avail. I also tried re-cloning the whole repository, but have run into permission issues.
How can I go about this?
Hey @Christof Koegler _Gaims GmbH_
Welcome to the community.
I believe you are missing the 'main' branch because, by default, the Bitbucket pipeline only does a shallow clone of your repository, which only includes the triggered branch.
To fix this, simply add full clone depth in your YAML which should trigger the full clone as mentioned in our guide here.
clone:
depth: full # include full clone
pipelines:
default:
- step:
name: Cloning
script:
- echo "Clone all the things!"
Cheers,
Syahrul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.