bb ref¶
List a repository's branches and tags, and resolve a ref to its commit
2 commands.
bb ref list- List repository refs (branches and tags)
bb ref resolve- Resolve a ref by name to its full ref and commit if applicable
bb ref list¶
List repository refs (branches and tags)
bb ref list [flags]
# The branches and tags of a repository
bb ref list --repo PROJ/repo
# The ones whose name matches
bb ref list --repo PROJ/repo --filter release
--filter string- Filter refs by name
Inherited from bb ref:
--repo string- Repository as PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
Also takes the global flags.
Dry run: Runs as usual: this command changes nothing, so there is nothing to hold back
Output with --json, where ? marks a field that can be absent
data
repository object
projectKey string Project key the repository belongs to.
slug string Repository slug.
refs list of object or null Matching branches and tags.
id? string Full ref name, for example refs/heads/main.
displayId? string Short ref name, for example main.
type? BRANCH|TAG
bb ref resolve¶
Resolve a ref by name to its full ref and commit if applicable
bb ref resolve <ref>
# The full ref and commit a name stands for
bb ref resolve main --repo PROJ/repo
Inherited from bb ref:
--repo string- Repository as PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
Also takes the global flags.
Dry run: Runs as usual: this command changes nothing, so there is nothing to hold back
Output with --json, where ? marks a field that can be absent
data
repository object
projectKey string Project key the repository belongs to.
slug string Repository slug.
ref object
id? string Full ref name, for example refs/heads/main.
displayId? string Short ref name, for example main.
type? BRANCH|TAG