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

# Versioning

> Version control your notebooks with GitHub and deploy from commits.

GitHub Versioning lets you manage code for Notebooks and Queries through Git: link a Nekt resource to a GitHub repository, and every push to the configured branch (e.g. **main**) automatically triggers a redeploy in Nekt. You get version control, collaboration via pull requests, and a clear audit trail.

This requires a [workspace-wide GitHub connection](/workspace/github): an owner or admin connects your organization in **Settings → GitHub** before you can link repositories to individual Notebooks or Queries.

Once connected, you link a repo per resource (when creating or editing, or via the **Versioning** column in the list). After that, no manual "deploy" step is needed—Nekt stays in sync with your branch.

<video controls src="https://public.nekt.ai/videos/versioning_github.mp4" autoPlay muted playsInline preload="auto" className="w-full" />

## Prerequisite: Connect GitHub (workspace)

Before linking repositories, an owner or admin must [connect your GitHub organization](/workspace/github) in **Settings → GitHub**. This step is mandatory before you can assign repositories to Notebooks.

## Prepare your repository

Use a GitHub repository to store your Notebook code. It can be empty. A dedicated repo per Notebook is recommended for clarity and isolation.

## Link the repository to a Notebook

You can link a repo when **creating** a new Notebook or **editing** an existing one.

### When creating a new Notebook

During creation, use the GitHub section to select the repository (and branch, if offered).

### When editing an existing Notebook

1. Open the Notebook.
2. Go to **Settings** and find the **GitHub** / versioning section.
3. Select the repository (and branch) to link.

You can also use the **Versioning** column in the Notebooks list: click **Connect repository** and choose the repo.

## Automatic deployments

Once a Notebook is linked, any push to the configured branch (typically **main**) automatically redeploys that Notebook in Nekt. No manual deploy step is required.
