Skip to main content
GitHub Versioning keeps the code of your Notebooks and Queries in a GitHub repository. Each resource is linked to a repository and a branch, and Nekt keeps both sides in sync: a push to that branch updates the resource in Nekt, and a change saved in Nekt reaches GitHub, either through a pull request or as a direct commit, depending on how your workspace writes to GitHub. You get version control, review through pull requests, and a clear audit trail. This requires the organization’s GitHub connection: an organization Owner or Admin connects your GitHub account in Organization settings → GitHub and chooses which repositories each workspace may use.

Prerequisite: Connect GitHub (organization)

Before linking repositories, an organization Owner or Admin must connect your GitHub account in Organization settings → GitHub. The repositories a workspace may use are the ones chosen for it there.

Prepare your repository

The repository can be empty, and several Notebooks and Queries can share it. Nekt stores each resource in its own folder, named after the resource’s pipeline slug. You don’t choose the folder.
Other files in the repository, such as a README.md or CI configuration, are ignored. In the Queries list, use the Versioning column:
  1. Click Connect repository for the Query you want to version.
  2. In the dialog, select the GitHub repository and branch, and confirm. Nekt commits the Query’s current SQL to the repository.
You can link or change the linked repo at any time from the same Versioning cell. If your workspace has no GitHub connection yet, the cell will prompt you to ask an admin to configure it in Settings.

How the sync works

  • Linking uploads the code from Nekt. When you link a resource to a repository, Nekt sends its current code to the resource’s folder on the chosen branch, replacing any notebook.py, query.sql, or requirements.txt already in that folder. In a workspace that writes through pull requests, this upload is itself a pull request.
  • Pushes to the branch update Nekt. Nekt reads the files changed in each push to the linked branch and updates only the resources whose files changed. Pushes to other branches are ignored.
  • Saving in Nekt reaches GitHub in one of two ways, chosen by the workspace admin in Settings → GitHub → How Nekt writes to GitHub:
    • Open a pull request (the default for workspaces that connect GitHub from now on): saving the code or the dependencies opens a pull request, or adds a commit to the one already open. Until it is merged, runs keep using the published code, and the resource shows the proposal with its diff. Nekt merges the pull request as soon as the checks pass and the branch rules allow, then deletes its branch. Every other setting of the resource (trigger, output, and so on) applies when you save.
    • Commit directly on the branch: the change is committed to the branch and takes effect when you save. Workspaces that were already using GitHub before pull requests were available stay on this mode until their admin switches them.
  • A proposal can be discarded. Discarding it closes the pull request and keeps the published code. If the pull request conflicts with the branch and GitHub cannot update it, you can rebuild the proposal on top of the current branch. A pull request closed on GitHub without a merge can be reopened from Nekt.
  • Pushed Notebooks are validated before they apply. Nekt checks that the tables, volumes, and secrets a Notebook uses exist, and that the user who linked it can read its input tables and edit its output tables. If a check fails, the code in Nekt is not changed and the error is shown on the Notebook. Fix the code and push again.
Linking a resource overwrites its folder in the repository with the code currently in Nekt. If the repository already holds the version you want to keep, link the resource first, then push that version again: Nekt imports it from the push.
  • Link the branch you deploy from, typically main, and protect it on GitHub with the checks you want: in a workspace that writes through pull requests, Nekt merges only when they pass.
  • A protected branch refuses direct commits. If the branch requires pull requests or status checks, a workspace that commits directly gets an error saying the branch is protected. Switch the workspace to pull requests in Settings → GitHub, or relax the branch protection.
  • Link resources with a user who keeps the right permissions. Syncs triggered by a push run with the permissions of the user who linked the resource, so use someone with access to its input and output tables who will stay in the workspace.

API & MCP

Platform API

Not available in the Platform API yet.

MCP tools

connect_transformations_to_github and list_github_repositories.