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

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

Avatar

1 badge earned

Collect

Participate in fun challenges

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

Challenges
Coins

Gift kudos to your peers

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

Recognition
Ribbon

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!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,467,291
Community Members
 
Community Events
177
Community Groups

How to get all branches from pipelines?

In bitbucket-pipelines.yml I have the following script:

`git branch -a`

When it's run on `master` branch, it shows only `master` and `remotes/origin/master`. When it's run on `123` branch, it shows only `123` and `remotes/origin/123`.

So it shows only current branch, but doesn't show all the repository branches.

I wonder, why?

Is there a way to get access to all the repository branches from git CLI?

1 answer

0 votes
Norbert C Atlassian Team Mar 28, 2022

Hi Mikhail, 

Thank you for contacting Atlassian Community, my name is Norbert and I'm a Bitbucket Cloud Support Engineer, it's nice to meet with you!

I'd like to inform you when you clone a repository with Bitbucket Pipelines, by default it only clones the branch where the Pipelines got initiated. This is due to make the build quicker as it doesn't need to clone all the branches.

In case you would like to clone the full repository with every repository, I would like to suggest you to use the following settings in your configuration. This way it'll clone every branch, but please keep in mind, that it'll make your build a bit slower:

clone: 
depth: full

Please let me know how it goes.

Best Regards,
Norbert
Atlassian Bitbucket Cloud Support

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events