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

# GitHub

> Connect GitHub so LivingContext can read your docs repositories, commit changes, and open pull requests — your repo stays the source of truth.

LivingContext stores documentation in **your** GitHub repositories. The GitHub connection is what lets the platform read those repos, write agent-drafted changes as commits, and open pull requests for review.

## Connect

<Steps>
  <Step title="Start the connection">
    Go to the **Connections** page (or connect during [onboarding](/getting-started/onboarding) — a Git provider is required before the app unlocks, unless you start on a [starter workspace](/getting-started/onboarding#no-repo-start-with-a-starter-workspace)).
  </Step>

  <Step title="Authorize with OAuth">
    You're sent to GitHub to grant access with the `repo` scope, which covers reading repository content and pushing commits. Authorizing alone only proves your identity, so there's one more step.
  </Step>

  <Step title="Install the GitHub App">
    Use **Install / manage on GitHub** on the connection card to install the LivingContext app on each account or organization you sync from, picking which repositories it may access. Come back and hit **refresh** to pull the new installations in.
  </Step>

  <Step title="Pick your docs repos">
    Select which repositories hold documentation under **Settings → Docs repositories**.
  </Step>
</Steps>

<Note>
  If repositories are missing from the picker, the app isn't installed on their owner yet — that's what the **Install / manage** link fixes.
</Note>

## What the connection powers

| Capability            | Where you see it                                                                         |
| --------------------- | ---------------------------------------------------------------------------------------- |
| Repository listing    | Choosing docs repos in Settings and onboarding                                           |
| Reading docs content  | The [Docs viewer](/guides/docs-viewer), search, and agent grounding                      |
| Committing changes    | Direct authoring, published [captures](/capture/publishing), and change request branches |
| Opening pull requests | Shipping a [change request](/guides/editing-and-change-requests) for final review        |

## Tracked branches

Beyond docs repos, you can track branches of your **code** repositories under **Settings → Commit tracking**. The commit updater watches tracked branches and drafts documentation updates for each commit that lands — see [Commits](/guides/commits).

## Moving off a starter workspace

If you began on a [starter workspace](/getting-started/onboarding#no-repo-start-with-a-starter-workspace), connecting GitHub unlocks a **Move your workspace to your own GitHub** banner on Connections: enter a repository you own as `owner/repo`, click **Move workspace**, and your docs are copied across in one commit while the workspace switches over.

## Security

* OAuth tokens are **encrypted at rest**.
* Tokens are **refreshed automatically** — no manual re-authentication under normal use.
* Revoking the grant (from GitHub or from Connections) disconnects the integration immediately.

<Note>
  Because every write is an ordinary Git commit or pull request, you retain full history and can review or revert anything LivingContext writes using your normal Git workflow.
</Note>

## Working with multiple repos

You can select more than one docs repository. The **repo switcher** controls which one repo-bound surfaces — Docs, Changelog, Commits, API Reference — display at any moment, and [spaces](/admin/spaces-and-repos) group repositories into scopes for workspace-wide surfaces like Home and the [Inbox](/guides/inbox).

## Troubleshooting

<Accordion title="Repositories are missing from the list">
  Make sure the OAuth grant covers the organization that owns the repository — GitHub organization owners may need to approve third-party access. Reconnecting from the Connections page re-runs the authorization.
</Accordion>

<Accordion title="Commits or PRs are failing">
  A revoked or expired grant is the usual cause. Check the connection status on the Connections page and reconnect if it shows an error.
</Accordion>

Prefer GitLab? The [GitLab integration](/integrations/gitlab) offers the same capabilities.
