# How to Push Your Code to GitHub from ChanTan Studio

> Keep a copy of your ChanTan Studio project in your own private GitHub repository: connect once, push with one button, and turn on automatic sync.

Last updated: 2026-08-21 · https://chantan.studio/docs/en/push-code-to-github/

GitHub is a place to keep a copy of your project's files in your own account. If you've never used it, you don't need it — publishing is how you put your app online. GitHub is for people who want their own copy of the code.

Two things to understand first:

- **It is one-way.** ChanTan sends your files to GitHub, never the other way round.
- **Your repository is always private.** Only you can see it.
- There is **no ZIP download** of project code today. GitHub is the way to get the code out. (Settings → Security → "Export data" downloads your *account* data — profile, projects list, credit history — not your app's code.)

## 1. Connect your GitHub account

Open **Settings** → **Integrations** and press **"Connect"**.

You can also start from inside a project: press the **GitHub button** in the project header → **"Push to GitHub"** → **"Connect GitHub"**.

## 2. Approve on GitHub

GitHub asks you to approve the connection. Say yes, and you come straight back to where you started.

When it works you see **"GitHub connected"** and your **@username** appears as a green chip. If it fails you'll see "Could not connect GitHub. Try again." — press it again.

## 3. Open your project and press "Push to GitHub"

Go into the project you want to save, press the **GitHub button** in the header, then **"Push to GitHub"**.

## 4. Name the repository and push

The first time, choose a **"Repository name"** — it's already filled in from your project name. Underneath it says: *"Created as a PRIVATE repo on @username — only you can see it."*

Press **"Create repo & push"**.

✅ **Done!** When it finishes you get an **"Open on GitHub"** button. Press it to see your files sitting in your own private repository.

## Pushing again later

After the first push, the button becomes **"Push latest code"**, and a line above it tells you the truth:

| What it says | What it means |
| --- | --- |
| "You have changes that aren't on GitHub yet." | Press "Push latest code" to send them |
| "GitHub is up to date with this project." | Nothing to send |

You can't push the same project twice within 30 seconds — you'll see *"Just pushed — give it a few seconds and try again."*

## Keeping it in sync automatically

After the first push, a tick-box appears: **"Keep GitHub in sync automatically"** — *"Pushes your changes within ~5 minutes. Many edits become one commit."*

> ⚠️ **"Files you edit on GitHub get replaced on the next sync. Files you add stay."** ChanTan is the source of truth for files it manages — don't do your editing on GitHub's side.

Auto-sync switches itself off after repeated failures, or straight away when the cause can't fix itself: GitHub disconnected, the repository name taken, the project deleted, or the project too large. Tick the box again to clear that and resume.

## What's protected

- **Repositories are always created private.**
- **Your database keys are removed** and replaced with placeholders before anything is sent.
- If that removal can't be guaranteed, **nothing is sent at all** — you'll see: *"We couldn't verify your database keys would be removed, so nothing was pushed. Try again in a moment."*
- Settings files containing secrets are never sent.

## Honest limits

| Limit | Value |
| --- | --- |
| Files per project | **2,000** |
| One file | **1 MB** |
| Whole project | **10 MB** |
| Same project pushed again | Not within **30 seconds** |

Also honest: **GitHub error messages come back in English**, even when the rest of the app is in your language.

## Disconnecting

Settings → **Integrations** → **"Disconnect"** → confirm with **"Yes, disconnect"**.

**Your repositories are not deleted.** *"Repos are created private. Disconnecting removes Chantan's access — your repos stay yours."*

If afterwards you see "Disconnected here, but GitHub still lists the app", finish the removal on GitHub's side: GitHub → Settings → Applications → remove **"Chantan Studio"**.

## Remember

GitHub is a backup and a way to own your code. It is **not** how your app goes online — that's [Publish](https://chantan.studio/docs/en/publish-your-app.md), and it stays the right way to get your app in front of visitors.
