cops bitbucket branch commands let you inspect branches in a Bitbucket repository. They call the Bitbucket REST API (/rest/api/1.0).
cops bitbucket branch list
cops bitbucket branch list
List branches in a Bitbucket repository. Supports optional name filtering.Alias:
cops bitbucket branch lsUsage
Flags
Bitbucket project key (e.g.
MYPROJ).Bitbucket repository slug (e.g.
my-service).Optional branch name filter. Passes the value as
filterText to the Bitbucket API — returns branches whose names contain this string.Maximum number of branches to return.
Output format:
table, json, or markdown.Disable TLS certificate validation. Use only with self-signed certificates in trusted networks.
Override the active config profile.
Output columns
id, name, latestCommitExamples
cops bitbucket branch exists
cops bitbucket branch exists
Check whether a specific branch exists in a Bitbucket repository. Exits with code
1 if the branch is not found.Usage
Flags
Bitbucket project key (e.g.
MYPROJ).Bitbucket repository slug (e.g.
my-service).Branch name to check (e.g.
release/2026-06).Output format:
table, json, or markdown.Disable TLS certificate validation. Use only with self-signed certificates in trusted networks.
Override the active config profile.
Output columns
project, repo, branch, existsExit codes
| Code | Meaning |
|---|---|
0 | Branch exists |
1 | Branch does not exist |
Examples
Related
cops bitbucket repo
Fetch repository details.
cops bitbucket pr
List pull requests and run PR readiness checks.
