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

# GitHub Sync

> Import, sync, and view notebooks from GitHub repositories

## Overview

Alph integrates deeply with GitHub — import notebooks from repos, sync changes bidirectionally with cell-level diffs, and view any public notebook without cloning.

**Important:** Imported and synced notebooks live in Alph. They're full Alph notebooks with AI assistance, execution, and publishing. The GitHub connection is for syncing content — the notebook itself is hosted on the platform.

The `gitalph.com` viewer is separate — it renders notebooks directly from GitHub for quick viewing without importing.

## Connecting GitHub

<Steps>
  <Step title="Go to Integrations">
    From your organization settings, click **Integrations**
  </Step>

  <Step title="Connect GitHub">
    Click **Connect GitHub** and authorize the Alph GitHub App
  </Step>

  <Step title="Select repositories">
    Choose which repos to give Alph access to
  </Step>
</Steps>

## Importing Notebooks

1. Go to **Notebooks** → **Import** → **From GitHub**
2. Browse your connected repositories
3. Select notebooks to import (single or bulk)
4. Set title, visibility, and tags
5. Click **Import**

Once imported, the notebook is an Alph notebook. Edit it with AI, execute code, publish it — everything works.

You can also drag-and-drop `.ipynb` files directly.

## Bidirectional Sync

Once a notebook is connected to a GitHub repo, changes flow both ways.

**Pull** — fetch the latest version from GitHub into Alph.

**Push** — commit your changes back to the repo. You can push directly to a branch or open a pull request with a custom commit message.

**Status indicators** show when your notebook is ahead (local changes), behind (remote changes), or both (needs merge).

### Cell-Level Diffs

Before pulling or pushing, review exactly what changed — cell by cell.

* Added, removed, and modified cells are color-coded
* Source code shows line-by-line unified diffs
* Output changes are displayed side-by-side
* Markdown cells show rendered previews

This isn't a raw JSON diff. It's a structured comparison that understands notebook semantics.

### Auto-Sync

Sync stays active by default. You can pause it (unsync) and resume later (reconnect) without losing the GitHub connection.

## GitHub Notebook Viewer

Any public GitHub notebook is available in Alph. Just swap `github.com` for `gitalph.com` in the URL:

```
github.com/owner/repo/blob/main/notebook.ipynb
  → gitalph.com/owner/repo/blob/main/notebook.ipynb
```

This isn't just a viewer — it's a full Alph notebook. Connect a project and execute cells, use AI assistance, chat about the code. Every `.ipynb` on GitHub is one URL swap away from being a live, runnable notebook.

## Managing Access

* **Add repos:** Integrations → GitHub → Configure
* **Disconnect:** GitHub Settings → Applications → Uninstall Alph
