Once your GitHub account is connected, you can export your project and keep it in sync as your app evolves.
Exporting for the first time
If you haven't connected GitHub yet, follow the steps in GitHub Export – Overview & Setup first.
When you complete the GitHub authorization flow, your first export starts automatically. Caffeine creates a new repository under your GitHub account and pushes your app's current code as the initial commit.
Choosing a repository name:
Before the first export, you can type a name for the repository. The field is pre-filled with a sanitized version of your project name. Repository names can only contain lowercase letters, numbers, and hyphens, and must be 100 characters or fewer.
Exporting again after changes
Every time the AI builds a new version of your app, you can push that version to GitHub:
- Open the project settings (gear icon in the chat panel).
- Select Push to GitHub.
- Click Save Changes to GitHub.
Caffeine queues the export and posts a message in your chat confirming it has been queued, along with the repository URL. Exports run in the background, so you can keep working while it processes. When the export finishes, another message appears in chat to confirm it completed successfully. If something goes wrong, you will also see a message in chat explaining what happened with a prompt to try again.
Caffeine pushes a new commit to the main branch of your repository. No new branch is created — all commits go to main. If the new build produced no file changes compared to the previous export, no commit is created.
Each export creates a single commit. For subsequent exports, Caffeine automatically writes a commit message that summarizes what changed, based on your recent conversation and the updated specification. This means your commit history gives a readable account of how the app developed.
Branch and repository structure
All exports target the main branch. Caffeine does not create separate feature branches or tags.
The files in the repository are organized exactly as Caffeine generates them:
- Backend code is in
src/backend/ - Frontend code is in
src/frontend/ - The app specification is at
src/spec.md - Image and asset files are in
frontend/public/assets/
Exporting to an existing repository
If you type the name of a repository that already exists in your GitHub account, Caffeine will push a new commit on top of the existing history rather than creating a new repository. This is useful if you want to maintain continuity with a repository you've already been working with.
What happens in GitHub
Each export creates one commit in your repository. You can view the full commit history in GitHub — including the AI-written commit messages — to see how your app has changed over time. The code in the repository is standard Motoko (backend) and React/TypeScript (frontend), so you can browse, clone, or fork it like any other GitHub repository.
Keeping your repository up to date
Caffeine does not automatically push to your personal GitHub repository when a new build completes. Each sync is triggered manually by clicking Save Changes to GitHub. If you want to keep GitHub in sync with your latest build, remember to push after each session.
Frequently asked questions
Why did my export not create a commit?
If the current build is identical to the last export — no files changed — Caffeine skips the commit. This can happen if you triggered an export twice without running a new build in between.
Can I push to a branch other than `main`?
No. All exports commit to the main branch. Branch selection is not currently supported.
Can I control the commit message?
No. For subsequent exports, Caffeine writes the commit message automatically based on your recent conversation and specification changes. For the initial export, the message is always Initial commit — Exported from Caffeine.
The repository name I want is already taken in my GitHub account. What happens?
If you type the name of an existing repository, Caffeine pushes a new commit on top of that repository's existing history instead of creating a new one. Make sure this is what you intend before confirming.
I exported to the wrong repository. Can I change it?
You can disconnect GitHub Export and reconnect it, then type a different repository name during setup. This will create a new repository with the full history exported again from scratch. The old repository remains in your GitHub account — you can delete it there manually.
Does my commit history in GitHub persist if I rebuild the app in Caffeine?
Yes. Each export adds a commit on top of the existing history. Rebuilding your app in Caffeine does not reset or affect your GitHub repository until you manually push a new export.