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

# Git Sync

> Learn how to use Git Sync to sync your Xano workspace to GitHub or GitLab

Xano supports **one-way Git sync** to <Icon icon="https://mintcdn.com/xano-997cb9ee/aZQYcxhIvSDTNEim/images/icons/GitHub_light.svg?fit=max&auto=format&n=aZQYcxhIvSDTNEim&q=85&s=43b6a62193d3b7677b1507f3851c13c6" size={16} width="1024" height="1024" data-path="images/icons/GitHub_light.svg" /><Icon icon="https://mintcdn.com/xano-997cb9ee/aZQYcxhIvSDTNEim/images/icons/GitHub_dark.svg?fit=max&auto=format&n=aZQYcxhIvSDTNEim&q=85&s=744195baf98992d8c2e009ffafe0b937" size={16} width="1024" height="1024" data-path="images/icons/GitHub_dark.svg" /> GitHub and <Icon icon="https://mintcdn.com/xano-997cb9ee/aZQYcxhIvSDTNEim/images/icons/gitlab.svg?fit=max&auto=format&n=aZQYcxhIvSDTNEim&q=85&s=8ee5edf2535d88a8b345481d673c1b9e" size={16} width="32" height="32" data-path="images/icons/gitlab.svg" /> GitLab.

This feature makes your XanoScript a first-class citizen in your development workflow, while keeping Xano as the **source of truth**. Publish your XanoScript to GitHub or GitLab to keep a versioned copy of your code outside of Xano for disaster recovery, compliance, or auditing. Or open source your XanoScript to the world to get feedback, contributions, and help from the community.

<iframe width="560" height="315" src="https://www.youtube.com/embed/R-kwSxRFeU8?si=d2POKdRy-FIOV2R0" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen />

***

## How It Works

* **Write code** in the Xano UI or in your IDE with the XanoScript VS Code extension.
* **Sync to Xano** — all changes flow through Xano first.
* **Push to Git** — Xano can export your latest code to GitHub or GitLab.

***

## Benefits of Git Sync

### 🔐 Version Control

Every sync creates a new commit in your Git repo. Track the history of changes and roll back when needed.

### 🧰 Collaboration

Use branches, pull requests, and code reviews. Non-Xano teammates can review and contribute using familiar Git tools.

### ☁️ Backup & Transparency

Keep a secure, versioned copy of your code outside of Xano for disaster recovery, compliance, or auditing.

### 🔄 Automation & Integration

Plug your XanoScript into CI/CD pipelines, linters, and security scanners. Git sync bridges Xano into your existing engineering ecosystem.

***

## What Git Sync Is *Not*

> ❌ Git sync is **not** a way to deploy code into Xano.\
> ❌ You cannot push changes from GitHub/GitLab into Xano.\
> ✅ All changes must flow through Xano—either via the UI or the XanoScript VS Code extension.

***

## Example Workflow

1. Jamie edits an API function in **VS Code** using the XanoScript extension.
2. The changes sync directly to **Xano**.
3. From Xano, Jamie pushes the latest code to **GitHub**.
4. The team reviews the diff in GitHub, merges a pull request, and maintains a clean version history.

***

## Using Git Sync in Xano

<Steps>
  <Step title="In GitHub, create a new repository if you haven't already." />

  <Step title="In Xano's Git Sync menu, provide the URL of your GitHub repository.">
    <img src="https://mintcdn.com/xano-997cb9ee/GGKkNaTQIWPG92tN/images/workspace-settings-20260331-173646.png?fit=max&auto=format&n=GGKkNaTQIWPG92tN&q=85&s=bac2a194c0eb1b37ed026c1941d3948a" alt="workspace-settings-20260331-173646" width="1840" height="1083" data-path="images/workspace-settings-20260331-173646.png" />
  </Step>

  <Step title="Generate an SSH key">
    In Xano, click the <span class="ui-bubble">Generate</span> button. Copy this key and add it to your repository settings.
  </Step>

  <Step title="In GitHub, head to your repository settings and add the SSH key you generated in Xano.">
    <img src="https://mintcdn.com/xano-997cb9ee/GK7krl3WPzHY1W81/images/git-sync-20251008-130218.png?fit=max&auto=format&n=GK7krl3WPzHY1W81&q=85&s=f3702cf9275e1ca5775e6770093838ba" alt="Adding an SSH key to a GitHub repo" width="2086" height="1241" data-path="images/git-sync-20251008-130218.png" />
  </Step>
</Steps>

***

## FAQ

**Why can’t I push changes from GitHub into Xano?**\
Xano treats itself as the **single source of truth** for XanoScript.\
Pulling code from Git would create conflicts, dependencies, and merge issues. Instead, use the XanoScript VS Code extension to push changes directly to Xano. Git is your **mirror** for history, backup, and collaboration.
