---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.6
alternate:
  - https://sourcecraft.dev/portal/docs/en/cli-ref/src-pr-list-commits.md
  - https://sourcecraft.dev/portal/docs/ru/cli-ref/src-pr-list-commits.md
---
> **Documentation Index:** Fetch the complete configuration index at https://sourcecraft.dev/portal/docs/en/llms.txt

# src pr list-commits

List commits in a pull request using git log.

If no PR number is specified, the command will attempt to find a PR
associated with the current branch.

By default uses three-dot range (git log target...source) which shows
commits reachable from source but not from the merge-base.
Use --two-dots for a simple two-dot range (git log target..source).

Any arguments after -- are passed directly to git log (e.g., --oneline).

## Usage

`src pr list-commits [<number>] [-- <git-log-args>...] [flags]`

### Examples

**List commits with default format**

`src pr list-commits`

**With --oneline (passing git arguments)**

`src pr list-commits -- --oneline`

**Explicit PR number**

`src pr list-commits 123 -- --oneline`

**Two-dot range**

`src pr list-commits --two-dots -- --oneline`

### Flags

| Flag | Description |
| --- | --- |
| `--two-dots` | Use two-dot range instead of three-dot (merge-base) range |

### Inherited flags

| Flag | Description |
| --- | --- |
| `--env string` | Override Sourcecraft environment (use 'src envs' to list available) |
| `--json string` | Output JSON, optionally filtered (--json or --json=field1,field2) |
| `--json-compact string` | Output compact JSON, optionally filtered |
| `-R, --repo string` | Select another repository using OWNER/REPO format |
| `-V, --verbose` | Enable debug logging output |

### Learn more

Use `src pr list-commits <subcommand> --help` for more information about a command.
