Lovable GitHub export: code, backend and deployment checklist
Export Lovable code to GitHub without confusing branch sync with database migration, secret transfer or publishing. A practical developer handoff checklist.
Sources are linked in the guide. Read our editorial policy.
On this page 7 sections
Lovable GitHub export gives you a repository with two-way code sync, not a complete copy of your running application. Database records, stored secrets and publishing remain separate concerns. A local clone can still connect to the production backend, so moving the code to your laptop does not make writes safe.
This checklist is based on Lovable’s Git sync documentation, researched November 10, 2026. It is a documentation-backed handoff procedure, not a report of a migration performed for this article. See the Lovable directory entry for the product overview.
Know what “export” means
Lovable creates a new repository when you first connect a project. You cannot use this flow to import an arbitrary existing GitHub repository into Lovable. After that initial export, changes can travel both ways: Lovable pushes its edits, and commits on the synced branch return to the Lovable project.
Each project links to one repository on one provider, and Lovable edits and syncs one branch at a time. A commit on another branch will not appear in Lovable unless you merge it into the synced branch or switch Lovable to that branch.
If you only need a code archive, the documentation also describes Download codebase in Project settings or the code editor on paid plans. An archive is not an ongoing synchronization setup.
Make an inventory before connecting
The important boundary is code versus running services:
| Item | What Git sync carries | Separate handoff requirement |
|---|---|---|
| Application source | Project files on the synced branch | Record the branch and commit being handed over |
| Database structure | Migration files, where used | Review and apply schema changes separately |
| Database records | Not included | Arrange a separate data export or keep the existing backend |
| Edge Functions | Function source, where used | Deploy changed functions separately |
| Stored secrets | Secrets stored in Lovable stay out of the repository | Provision required server-side values through the destination’s secret storage |
| Managed connector credentials | Not exportable from Lovable | Identify calls that require Lovable’s runtime or a separately configured integration |
| Published application | A synced commit does not publish | Publish in Lovable or configure a separate deployment |
| Local test data | A branch does not create a database | Confirm the backend target before any write |
Do not treat a checked-in migration as evidence that a database has that schema. Likewise, a frontend build passing does not prove sign-in, server functions or external integrations work in the new environment.
Connect GitHub and establish the handoff point
The GitHub integration guide distinguishes a workspace connection from the project’s repository link:
- A workspace owner or admin adds the GitHub connection under Workspace settings → Git → GitHub, choosing the intended account or organization and authorizing the Lovable GitHub app.
- A workspace or project owner/admin opens Project settings → Git → GitHub and connects the project to the appropriate workspace connection. Lovable creates the repository; the documented default visibility is private.
- Let any current Lovable edit finish. Confirm the branch picker and wait for the sync card to say In sync with GitHub before cloning or handing off.
- Record the repository, synced branch and commit. Give the developer repository access; that is separate from permission to edit the project in Lovable.
The Re-check button compares the branches again; it does not itself synchronize them. If the histories have diverged, stop treating either working copy as the agreed handoff version and follow Lovable’s documented recovery flow rather than force-pushing over it.
Inspect the environment before starting the clone
Read the exported project’s README and package.json for its actual installation and development commands. Do not assume every Lovable project has the same framework or runtime.
The current documentation distinguishes older React/Vite apps from newer TanStack Start apps created from May 13, 2026. In the older architecture, connector and AI calls can run through backend Edge Functions. In newer apps, server code runs locally during local development, and Lovable-managed connector and AI credentials are not available there. Lovable directs users to its preview or published app for those calls.
Before testing:
- Identify the backend URL and the account/environment it belongs to. In applicable projects, variables such as
VITE_SUPABASE_URLandVITE_SUPABASE_PUBLISHABLE_KEYcan still point at the published app’s backend. - Use an approved test environment for writes where available. If testing against the existing backend is intentional, limit work to designated test accounts and records; do not experiment on customer data.
- Configure the local redirect URL with the authentication provider when needed.
- Identify server-side secrets and where they will be supplied. Never put service-role keys or other secrets in
VITE_variables: those values are exposed to the browser. - List integrations that cannot run outside Lovable as currently configured. A local failure there is not automatically a code-sync failure.
A Git feature branch isolates code changes, not database writes. This is the most important check before using a local coding agent on the exported app.
Keep local work separate, then deploy deliberately
Keep local development on a feature branch and merge reviewed changes into the synced branch. If your team requires pull requests for every change, give Lovable its own feature branch too. Avoid rewriting commits already on the synced branch through force-push, rebase or squash; Lovable recommends a new revert commit when undoing an existing change.
After merging, confirm sync before checking the Lovable preview. Backend changes need their own steps:
- Edge Functions: Lovable says to ask it to deploy the changed function after the commit syncs, then check the function in the backend management UI.
- Database migrations: Git sync does not execute new migration files. Review the intended schema change and apply it through the documented chat or SQL-editor workflow against the correct database. Do not blindly replay files against production.
- Publishing: the merge updates project code, not the published site. Publish separately when ready. If deploying elsewhere, follow the deployment and ownership guide and account for backend services as well as hosting.
For an agent-assisted handoff, record durable constraints and the exact changed files rather than pasting the entire project into a prompt. The context-engineering guide explains that separation.
Proposed acceptance checks before calling the export complete
These are checks for your project, not experiments run for this article:
| Check | Evidence to retain |
|---|---|
| Code agrees across Lovable and GitHub | Synced branch and matching handoff commit |
| Local app reaches the intended backend | Reviewed environment target and authorized test account |
| Sign-in works at the intended URL | Successful redirect and session in that environment |
| Backend changes are actually active | Applied schema state and deployed function behavior, not only repository files |
| Required integrations work in the target runtime | A permitted test of each relevant connector or AI call |
| Published behavior matches the reviewed change | Result observed at the actual destination after publishing |
Use the coding-agent acceptance workflow to define those results before implementation. A successful export ends with a known code revision and explicit service ownership—not merely a new repository.
Official sources
Researched November 10, 2026; product behavior can change.
- Lovable Git sync overview: export-only setup, two-way sync, branch boundaries, local environments, backend files and publishing.
- Lovable GitHub integration: connection roles, repository creation and project setup.
- Deployment, hosting and ownership: further guidance for a deployment outside Lovable.