> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tracelit.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Bitbucket

> Connect a Bitbucket repository to Tracelit for source-backed root cause and pull requests with proposed fixes.

Connect **Bitbucket** so Tracelit can pull repository source when incidents open and open pull requests with proposed fixes. Your team reviews and merges — nothing ships without approval.

***

## Connect Bitbucket

<Steps>
  <Step title="Authorize Bitbucket">
    In the app, go to **Settings → Integrations** and connect **Bitbucket**. Authorize Tracelit for the workspaces and repositories you want to use.
  </Step>

  <Step title="Link a repository">
    Select the site or service, open **Utilities → Repository**, and link the Bitbucket repo Tracelit should use for analysis.
  </Step>

  <Step title="Map branches">
    Set **Development** and **Production** to the branches Tracelit should pull and patch for each environment.
  </Step>

  <Step title="Enable resolution gates">
    Under **Utilities → Environment**, enable **Allow resolutions** (and **Code analysis** for backend services) on environments you trust.
  </Step>
</Steps>

<Note>
  Prefer GitHub today? The full App install, webhooks, and auto-merge loop are documented in [GitHub](/integrations/github). Bitbucket follows the same Utilities → Repository → map branches pattern once connected.
</Note>

***

## What you get

| Capability           | Detail                                                                            |
| -------------------- | --------------------------------------------------------------------------------- |
| **Source workspace** | Pull the mapped branch into the resolution workspace and open the file that threw |
| **Root cause**       | Liter matches stack frames to real source in the linked repository                |
| **Pull requests**    | Proposed fixes open as PRs on a fresh branch for your normal review flow          |

Tracelit does not push to your default branch. Fixes always go through a pull request.

***

## Branch mapping

Resolutions for **Development** and **Production** read code from the branches you map in **Utilities → Repository**. Keep those mappings aligned with how you deploy, or analysis and patches will target the wrong tree.

See [Utilities](/agentic/utilities) for environment gates and archive behavior.

***

## Related

| Topic                        | Guide                                  |
| ---------------------------- | -------------------------------------- |
| Integrations overview        | [Integrations](/integrations/overview) |
| GitHub (fully live App flow) | [GitHub](/integrations/github)         |
| GitLab                       | [GitLab](/integrations/gitlab)         |
| Resolutions                  | [Resolutions](/agentic/resolutions)    |
