How to Sync Your Lovable Project to GitHub
Last updated: By The Migrator Team
To sync your Lovable project to GitHub you only need a free GitHub account and a few clicks inside Lovable. It is the first step of almost every Lovable Cloud migration, because your database structure and edge functions are stored as files in the repository.
This guide shows how to connect, what appears in the repository, and how to download it. The official Lovable documentation covers the GitHub integration in full, and the interface may change over time, so use this guide for the overall flow.
Step 1: Connect your GitHub account in Lovable
1Open the GitHub option
In your Lovable project, look for the GitHub button or the GitHub section in project settings.

Lovable project settings showing how to sync your Lovable project to GitHub 2Approve access
Sign in to GitHub if asked, and approve the Lovable GitHub app for your account or organization.
Step 2: Sync your Lovable project to GitHub by creating a repository
Choose to connect the project, then create a new repository. Pick a name and decide on private or public. A private repository is the safer choice for a business app, since it may contain table structures and function code.
After this, changes you make in Lovable are pushed to the repository, and commits made on GitHub sync back into Lovable.
Step 3: Find the files you need for a migration
supabase/migrations/holds your database structure as timestamped SQL files.supabase/functions/holds your edge functions, one folder each.supabase/config.tomlholds the project id and per-function settings..envis not committed to GitHub; you recreate it from your new project's values.
Step 4: Download or clone the repository
On github.com open the repository, choose Code, and pick Download ZIP. Developers can clone instead:
git clone https://github.com/YOUR_USER/YOUR_REPO.git
Connect GitHub to the migrator without downloading
The free migration tool can read the repository directly through a GitHub App with read-only access. You choose which repositories to share, and nothing is written to GitHub. If you prefer, simply upload the ZIP.
Frequently asked questions
Is syncing to GitHub free?
Yes. GitHub offers free private repositories. Check the Lovable documentation for any plan requirements on their side.
Will syncing change my Lovable project?
It adds a repository mirror of your code. Your app continues to work as before.
My repository has no supabase folder. What now?
Then your schema is not in migration files. Use the SQL fallback in the export guide.
How do I export code from Lovable?
Sync the project to GitHub, then download the repository as a ZIP or clone it. That gives you the full source code. See the export guide for data and files too.
Should the repository be private?
Private is recommended unless you want to publish your code.
Related guides
How to Export Your Lovable Project: Code, Data and Files
Everything you can export from Lovable: code, database, users, files, plus a backup checklist.
How to Export Your Lovable Cloud Database
Get your schema, table data and a SQL fallback out of Lovable Cloud.
How to Self-Host a Lovable App: Front End and Backend
Export, build and host your Lovable app on your own infrastructure, with your own backend.