<!-- auto-generated by cmd/docgen — do not edit -->

# bkt commit

Inspect and compare commits in a Bitbucket repository. Subcommands let you
view diffs between two commits or refs. Works with both Bitbucket Cloud and
Data Center; on Cloud the diff spec uses ".." notation, while on Data Center
the two refs are passed separately to the API.

```
bkt commit <command> [flags]
```

### Examples

```bash
# Show changes between two commit SHAs
  bkt commit diff abc1234 def5678

  # Compare a branch to main
  bkt commit diff feature/login main
```

## Subcommands

| Subcommand | Description | Key Flags |
|---|---|---|
| [diff](#bkt-commit-diff) | Show the diff between two commits or refs | `--project`, `--repo`, `--workspace` |

## bkt commit diff

Display a unified diff between two commits, branches, or tags. The output is
streamed through the configured pager when available.

On Data Center the two refs are resolved independently by the server. On Cloud
the refs are joined with ".." and sent as a single diff spec; note that branch
names containing literal ".." characters may confuse the Cloud API.

Use --project/--repo (DC) or --workspace/--repo (Cloud) to override the values
from the current context.

### Usage

```
bkt commit diff <from> <to> [flags]
```

### Flags

| Flag | Short | Description |
|---|---|---|
| `--project` |  | Bitbucket project key override |
| `--repo` |  | Repository slug override |
| `--workspace` |  | Bitbucket Cloud workspace override |

### Inherited Flags

| Flag | Short | Description |
|---|---|---|
| `--context` | `-c` | Active Bitbucket context name |
| `--format` |  | Output format: json or yaml (alias for --json/--yaml) |
| `--jq` |  | Apply a jq expression (implies JSON when no output format flag is set) |
| `--json` |  | Output in JSON format when supported |
| `--template` |  | Render output using Go templates |
| `--yaml` |  | Output in YAML format when supported |

### Examples

```bash
# Diff two commits
  bkt commit diff abc1234 def5678

  # Diff the current branch against main
  bkt commit diff feature/signup main

  # Diff with explicit repo override
  bkt commit diff v1.0.0 v1.1.0 --repo my-service

  # Diff on a Cloud workspace
  bkt commit diff develop main --workspace myteam --repo backend
```

