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

# Git version control

> Save your code and collaborate with your peers

# Overview

Version control is critical when working with complex analyses and workflows, especially when collaborating with your peers. Fabi offers version control connectors to help you save, share and update your code in just a few clicks.

# Connecting your GitHub account

<Note>
  We currently offer a GitHub integration. If you would like us to integrate another version control platform, please reach out to [support@fabi.ai](mailto:support@fabi.ai).
</Note>

From any Smartbook or workflow, click on the overflow menu in the header, and select `Repository Sync`

<Frame>
  <img src="https://mintcdn.com/fabiai/t6UNAMEd40zDNLCy/images/repository_sync.png?fit=max&auto=format&n=t6UNAMEd40zDNLCy&q=85&s=f6922626b99d951cf72b9706243a95ce" alt="repository_sync" width="240" height="282" data-path="images/repository_sync.png" />
</Frame>

You'll be prompted to authorize GitHub. Once completed, you'll be ready to sync your Smartbook with GitHub.

<Frame>
  <img src="https://mintcdn.com/fabiai/t6UNAMEd40zDNLCy/images/authorize_github.png?fit=max&auto=format&n=t6UNAMEd40zDNLCy&q=85&s=b6db1e3069d9d8e3b78b6498f391b7b6" alt="authorizing_github" width="600" height="200" data-path="images/authorize_github.png" />
</Frame>

# Pushing your Smartbooks and workflows to GitHub

## Committing changes

Once you've connect Fabi to GitHub, selecting `Repository Sync` will open up a modal. You'll be prompted to provide:

* Repository name
* Branch (you can also create a new branch from here)
* Path prefix

<Frame>
  <img src="https://mintcdn.com/fabiai/t6UNAMEd40zDNLCy/images/configure_repo_sync.png?fit=max&auto=format&n=t6UNAMEd40zDNLCy&q=85&s=83a27ddf14f3922e63aa12e96e52d8f8" alt="configure_repo_sync" width="600" height="200" data-path="images/configure_repo_sync.png" />
</Frame>

The Smartbook will be pushed to GitHub as a YAML file in a folder marked by the unique Smartbook ID. You can think of Smartbooks as projects, these may contain more than just the single main file.

## Automatic commits

If you're publishing your Smartbook or workflow, you can configure your settings to automatically commit updates on publish. This is a convenient feature if you're quickly iterating on a data app or workflow and want to keep the source code up to date.

<Frame>
  <img src="https://mintcdn.com/fabiai/t6UNAMEd40zDNLCy/images/automatic_commits.png?fit=max&auto=format&n=t6UNAMEd40zDNLCy&q=85&s=1fc9e6c3e435e19dc79b0dffb5e39cb9" alt="automatic_commits" width="322" height="314" data-path="images/automatic_commits.png" />
</Frame>

## Pulling changes

To pull data from your repository, simply specify the repositoy, branch and prefix that you want to pull from. In most cases, if you've pushed your code from the Smartbook, most of this information should already be populated.

<Frame>
  <img src="https://mintcdn.com/fabiai/t6UNAMEd40zDNLCy/images/pull_from_version_control.png?fit=max&auto=format&n=t6UNAMEd40zDNLCy&q=85&s=60303405d826ce8947a7a6a355e880bc" alt="pull_from_version_control" width="500" height="200" data-path="images/pull_from_version_control.png" />
</Frame>
