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?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Users may also need to perform a "git checkout" as well if they want to get details about tags. I'm not sure why, but the following fails WITHOUT a checkout:
export TAG_INFO=`git branch --contains tags/$BITBUCKET_TAG 2>/dev/null`
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.