Key takeaways

  • Lovable's GitHub sync is available on every plan, including Free, and creates a new private repository for each project.
  • Downloading the whole project as a .zip with Download codebase requires a paid plan, from $25 a month as of November 14, 2026.
  • The sync is two-way on one branch at a time, and neither GitHub nor the .zip includes the data in your database.

To get your code out of Lovable, connect the project to GitHub in Project settings → Git → GitHub, or download it as a .zip with Download codebase. The Lovable GitHub sync works on every plan, Free included, and keeps your repository and your project in sync both ways. The .zip download needs a paid plan, according to Lovable's GitHub docs as of November 14, 2026.

A .zip is a one-time snapshot. GitHub sync is for ongoing work: a backup that stays current, a developer editing in their own IDE, or a host that deploys from a repository. If you are still deciding whether Lovable is the right builder, see what Lovable is and how it compares with Base44.

What plan you need

What you want Free Pro, Business, Enterprise
Git sync with github.com (also GitLab, Bitbucket) Yes Yes
Download the whole project as a .zip No Yes
Download one open file Yes Yes
Edit code in Lovable's code editor Read only Yes
GitHub Enterprise Cloud or Enterprise Server No Enterprise only

Lovable's plans page lists Pro from $25 a month for 100 monthly credits, billed monthly, as of November 14, 2026. On Enterprise workspaces, admins can limit .zip downloads to workspace admins and owners.

So on the Free plan, GitHub is the way to export the full project.

What you need before you start

  • A Lovable project you own or administer. Only workspace owners and admins can add the GitHub connection, and only workspace or project owners and admins can link a project to a repository.
  • A GitHub account. A free one works.
  • A browser that allows popups from Lovable. The GitHub install step opens in a popup.

How to connect Lovable to GitHub

The sync has two layers. First the workspace connects to a GitHub account or organization. Then each project links to its own repository.

1. Add the GitHub connection to your workspace

  1. Open Workspace settings → Git → GitHub → Add connection. If the project isn't connected yet, you can also start from Project settings → Git → GitHub → Add connection.
  2. Click Add account. On Free, Pro and Business you go straight to the github.com flow. On Enterprise, pick github.com from the three connection types.
  3. In the GitHub popup, choose your personal account or an organization.
  4. Choose All repositories or Only select repositories, then click Install & Authorize.

Lovable detects the installation and saves it as a connection that every project in the workspace can reuse. If the Lovable GitHub app is already installed on an account you can access, click Connect next to it instead.

The app asks for write access to contents, pull requests and workflows, read access to metadata, and administration write access. Lovable says the last one is what lets it create repositories in your account.

  1. Open the project and go to Project settings → Git → GitHub. You can also use the + button next to the chat input, under Project → GitHub.
  2. Under Accounts, click Connect next to the connection where the repository should go.

Lovable creates a new repository and starts the two-way sync. The repository is private by default on every plan. Nobody else sees the code unless you change its visibility on GitHub.

You can't link a project to a repository that already exists. Lovable always creates a new one.

How two-way sync works

After the link, every edit you make in Lovable is committed and pushed to GitHub. Commits pushed to the synced branch on GitHub flow back into the project.

Lovable syncs one branch at a time, the repository's default branch (usually main) unless you change it. The branch picker in the project's GitHub settings lets you switch branches or create a new one. A new branch starts from the branch Lovable is on now, not from main, so switch to main first if that is where you want to start.

The same settings page shows a sync status card. It reads "In sync with GitHub", "Lovable is N commits ahead", "GitHub is N commits ahead" or "Lovable and GitHub have diverged". Re-check compares the two sides again but doesn't sync anything.

Commits from Lovable are authored by lovable-dev[bot] and co-attributed to the workspace member who asked for the change, when that member has connected a GitHub account.

Two things the sync doesn't do. Pushing to GitHub never publishes your live site; only publishing from Lovable does. And the repository holds code and database migration files, never the data inside your database.

How to download your Lovable code as a .zip

On a paid plan, anyone with edit access can download the whole project:

  1. Open the project and click the Code tab in the toolbar.
  2. Click Download codebase at the bottom of the file panel.

The same button sits in the Download codebase section of Project settings → Git. To save a single file, open it and use Download in the file toolbar, which works on any plan.

The .zip and the GitHub repository hold the same thing: the source, the configuration files and the migration files. Neither includes the records in your database or files in storage. Those move separately, through Lovable's database export.

How to run a Lovable project locally

With GitHub connected, the project's GitHub settings show clone URLs for HTTPS, SSH and the GitHub CLI. Clone the repository and open it in any editor or coding assistant. Lovable accepts commits from any tool that works with Git.

From there, Lovable's Git sync guide gives these rules:

  1. Check the README and package.json in the repository for what to install and the commands that install dependencies and start the app.
  2. Lovable's deployment examples use npm and Node.js 22. If the repository has only a bun.lock file and no package-lock.json, install with Bun, or run npm install and commit the new package-lock.json before using npm ci.
  3. Know which backend you are talking to. In a project with Lovable's built-in backend, the .env file holds values such as VITE_SUPABASE_URL and VITE_SUPABASE_PUBLISHABLE_KEY. A local copy with those values reads and writes the same database as your published app, so test with test accounts and records.
  4. Never put a service role key or other secret in a VITE_ variable. Those end up in the code sent to the browser.
  5. Add your local URL to your sign-in provider's allowed redirect URLs, or logins will fail locally.

Projects created from May 13, 2026 use TanStack Start, which runs server code on your machine. In those, calls to Lovable AI and app connectors fail locally, because Lovable manages those credentials and they can't be copied out. Test them in the Lovable preview or the published app. Older React + Vite projects make those calls from Edge Functions on the backend, so they still work locally.

To tell which stack you have, open package.json. A TanStack Start project lists @tanstack/react-start.

Editing and committing on your computer uses no Lovable credits.

Keep your work on a feature branch

Lovable recommends leaving it on main and doing your own changes on a feature branch. Merge with a pull request when the work is ready, and Lovable pulls the result. Don't force-push, rebase or squash commits already on the synced branch. If a push does replace Lovable's work, Lovable saves a backup first, and the project owner can restore it from Project settings → Git.

After a merge, tell Lovable in the chat what you changed outside it, so its next edit builds on your code instead of undoing it.

Common Lovable GitHub problems and fixes

  • Clicking "Add account" does nothing. Your browser blocked the GitHub popup. Allow popups for Lovable and try again.
  • Commits pushed to GitHub don't show up in Lovable. You probably pushed to a branch Lovable isn't syncing. Merge into the synced branch, or switch the synced branch in the branch picker.
  • The status card says "GitHub is N commits ahead" after a push. Lovable missed the push notification. Push any new commit to the synced branch, even an empty one, and Lovable syncs to the current state:
git commit --allow-empty -m "Trigger Lovable sync"
git push

If the card says the two sides have diverged, that push replaces Lovable's version of the branch, so check first that your Lovable edits are already on GitHub.

  • Lovable's changes landed on a lovable-sync branch. GitHub rejected the push to your branch, usually because of branch protection or a conflicting commit. Open lovable-sync on GitHub and merge it through your normal review.
  • A lovable-fallback branch appeared. Someone deleted the synced branch on GitHub. Pick another branch or recreate the old one.
  • Sync stopped after you added a big file. GitHub rejects files over 100 MB. Delete the listed files and let the sync retry. Lovable itself can't save files over 10 MB.
  • "Lovable no longer has access to this repository." The GitHub app was limited to selected repositories that exclude this one. Click Reconnect and add the repository under Repository access.
  • The repository was deleted. The sync stops. Restore the repository on GitHub, or disconnect and connect again so Lovable creates a new one.

Renaming the repository, your account or your organization keeps the sync running. Moving the project to another Lovable workspace disconnects it.

Where to go next

If you want to host the app somewhere other than Lovable, its external hosting guide covers Vercel, Netlify, Cloudflare Pages, containers and your own servers, starting from the GitHub repository. Lovable's docs suggest running the app on your own computer first, so you know what it needs before a host adds its own settings.

Frequently asked questions

Can I export a Lovable project on the free plan?

Yes, through GitHub. Git sync with github.com works on the Free plan and pushes the full project to a private repository you own. The one-click Download codebase .zip needs a paid plan.

How do I download my code from Lovable?

On a paid plan, open the Code tab and click Download codebase at the bottom of the file panel, or use the Download codebase section in Project settings → Git. Lovable saves the whole project as a .zip file.

Can I connect Lovable to an existing GitHub repository?

No. Git sync always creates a new repository. To bring existing code into Lovable, download the repository as a ZIP and import it as a new project, then connect Git sync.

Does pushing to GitHub update my published Lovable app?

No. Pushes update the code and the preview in Lovable, but your live site only changes when you publish from Lovable.

Sources

  1. Sync your Lovable project with GitHubLovable
  2. Sync your Lovable project code with GitHub, GitLab, or BitbucketLovable
  3. View and edit your project's codeLovable
  4. Subscription plansLovable
  5. Deploying and hosting outside LovableLovable
  6. Deployment, hosting, and ownership options with LovableLovable

Add ClaudeGPT Si as a preferred source on Google