Learning resourcesReviewed · Lovable

Lovable Git sync overview (documentation)

This is Lovable's documentation page explaining how to keep a Lovable project's code in sync with your own GitHub, GitLab or Bitbucket repository, written for Lovable users and the developers who work alongside them, and its main catch is that sync is export-only, covers one branch at a time, and does not publish your app or run your backend changes. It describes the workspace connection and project repository link model, sync status states, branch and IDE workflows, backup and restore after history rewrites, commit attribution, disconnecting, and the limits that apply to every provider.

Researched 13 Nov 2026

In short.

This is Lovable's documentation page on Git sync, written for people building apps in Lovable who want their code in a GitHub, GitLab or Bitbucket repository they own, and its main catch is that the sync is export-only (you cannot import an existing repository), follows one branch at a time, and never publishes your app or deploys backend changes for you. The page explains a two-layer model (a workspace connection, then a per-project repository link), automatic two-way syncing of the synced branch, the sync status card, roles, a provider comparison, local IDE workflows, backup and restore when a push rewrites history, optional commit attribution with member email addresses, and what happens on disconnect. It is the vendor's own description, so the runtime behaviour it describes is unverified.

Researched and written by an AI model and checked by a second AI model. How it works

The selected scope is the single Lovable documentation page 'Sync your Lovable project code with GitHub, GitLab, or Bitbucket' at [https://docs.lovable.dev/integrations/git-sync-overview.md], captured in full on 2026-11-13. Linked pages are excluded, including the GitHub, GitLab and Bitbucket setup pages, Project settings, the code editor, security, publishing, credits and usage, deployment options, and the GitHub API connector page. No licence or terms document is part of the evidence. The connection, sync, restore and attribution behaviour the page describes is untested and comes only from the vendor's page, so runtime behaviour is unverified.

The overview

What this resource is

This is a single documentation page from Lovable, titled 'Sync your Lovable project code with GitHub, GitLab, or Bitbucket', at [https://docs.lovable.dev/integrations/git-sync-overview.md]. It explains Git sync, the Lovable feature that connects a Lovable project to a repository you own and keeps the two in step.

The page is a provider-neutral overview. Step-by-step setup lives on separate GitHub, GitLab and Bitbucket pages. The page links to them, but they are not part of this snapshot. The page was captured in full on 2026-11-13. The behaviour it describes is unverified at runtime.

Overall assessment

As documentation, the page is detailed and unusually candid about edge cases. It states what happens when histories diverge, when someone force-pushes, when a protected branch rejects a push, and when a local app calls services that only work inside Lovable. It also explains the commit attribution setting plainly: disabling the setting stops new email attribution; Lovable cannot remove existing addresses, but users can remove them by rewriting repository history.

Everything here comes from the vendor's own text. The described behaviour, including sync timing, the lovable-sync branch, backup and restore, and the status card, is unverified at runtime. Treat the page as the vendor's description of intended behaviour, and check it on a throwaway project before relying on it for important code.

Who it is for

The page addresses people who build with Lovable and want one or more of: a backup of their code in an account they control, collaboration with developers through branches and pull or merge requests, local editing in an IDE or coding assistant, deployment outside Lovable, or a copy within their own infrastructure (GitHub Enterprise Cloud with data residency, GitHub Enterprise Server, or self-managed GitLab).

It also says you do not need Git to use Lovable, and that many users build and launch entirely within Lovable. Beginners can follow the FAQ and the 'do I need Git' guidance. Developers will get more from the branch rules, the sync status semantics, the backend file notes, and the commit attribution section.

What it covers and what the feature does

Per the page, Git sync gives automatic two-way sync: edits made in Lovable are committed and pushed to your repository, and commits pushed to the synced branch appear in the Lovable project. Synced commits go through the same checks as Lovable edits. If they change dependencies, Lovable runs its dependency audit and updates the project's Security view.

You can switch the synced branch and create new branches from Lovable on all three providers. A sync status card in Project settings → Git compares the synced branch in Lovable with the same branch on the provider and reports states such as in sync, Lovable ahead, provider ahead, diverged, or could not be determined. Lovable compares the 50 most recent commits on each side, so a count can show 50+. A Re-check button compares again and does not itself sync anything.

The page also covers roles and permissions, a provider comparison table, restoring Lovable work after a push replaces it, optional commit attribution, disconnect and reconnect behaviour, and an FAQ.

Using it

Requirements

You need a Lovable project and a Lovable workspace, plus an account on a supported provider. Supported: GitHub (github.com, GitHub Enterprise Cloud with data residency, or GitHub Enterprise Server), GitLab (GitLab.com or a self-managed instance), and Bitbucket Cloud. The page states that Bitbucket Data Center is not supported.

Roles: workspace owners and admins add, update and delete workspace connections and control commit attribution. Workspace or project owners and admins connect and disconnect projects. Editors and above view sync status and work with the synced repository. Only the project owner can restore Lovable work after a push replaces it. The page says the provider pages list the exact role requirements. Those linked pages are not part of this snapshot.

For local work, the page treats repository access and Lovable project access as separate. Pushing your changes requires write access to the repository on your Git provider. Continuing to build on those changes inside Lovable requires an editor role on the project. You also need whatever tooling the repository's README and package.json call for, which the page does not specify.

How it works

The page describes two layers. A workspace connection authorizes Lovable to access a Git account, organization, group, workspace or instance, and any project in the workspace can use it. A workspace can hold connections to GitHub, GitLab and Bitbucket at once. A project repository link then ties one project to one repository under one of those connections. When you first link a project, Lovable creates a new repository and starts two-way sync automatically.

Connection methods differ: GitHub uses the Lovable GitHub App (or your own copy of it on Enterprise Server), while GitLab and Bitbucket use OAuth with your GitLab or Atlassian account. Commits Lovable pushes are not authored by the member who triggered them: on GitHub they come from the Lovable GitHub app, and on GitLab and Bitbucket they go through the account that authorized the connection.

Only one branch is synced at a time. If Lovable and the provider diverge, Lovable pushes its changes to a separate lovable-sync branch, and the next sync from the provider replaces Lovable's version of the branch with the provider's version. When a push to the synced branch rewrites commits Lovable made, Lovable first saves a backup of its copy. The project owner can then choose Restore Lovable work or Keep repository version. The notice shows for 24 hours, after which the owner can click Check for saved Lovable work in Project settings → Git. Restored work goes to the synced branch if the repository has no newer commits, otherwise to lovable-sync with a link to open a pull or merge request.

Setup

On this page, setup is only outlined: you manage the connection in Project settings → Git inside a project, and the page points to the GitHub, GitLab and Bitbucket pages for the actual steps. Those linked pages are not part of this snapshot, so the exact connection steps, permission screens and GitHub App installation details are unknown from this evidence.

For local work the page recommends: let any Lovable edit finish and confirm the sync status card shows in sync, clone the repository, keep Lovable on the synced branch (usually main), and make your own changes on a feature branch. Merge the feature branch into the synced branch to bring the work into Lovable. Do not force-push, rebase or squash commits already on the synced branch; add a revert commit to undo a change. If your team requires pull or merge requests on main, switch Lovable to its own feature branch and merge its work through the same review process.

Disconnecting stops the sync and deletes nothing on either side. Reconnecting links back to the same repository, with exceptions: on GitHub Enterprise Server and self-managed GitLab, or if the original repository is gone, Lovable creates a new repository.

Worked example from the page

The page gives a prompt template for telling Lovable about changes you made outside it, after the merge reaches the synced branch and the status card shows both sides in sync: 'I changed [files] outside Lovable to [describe the change]. Keep [behavior or constraint] when making further edits. Now [describe the next change you want].' It advises opening the changed files in the code editor and testing in the preview first.

The page also shows the line added to commit messages when commit attribution is enabled: a message such as 'Add a contact form' followed by a line 'X-Lovable-Author-Email: member@example.com'. Both are quoted from the documentation, and the behaviour they illustrate is unverified at runtime.

Assessment & evidence

Limitations and risks

The page lists these limits for every provider: export only (no importing an existing repository); one repository per project; one branch at a time; deleting the repository stops the sync; and drafts do not appear as repository branches, their code reaches the repository after acceptance. Moving a project to another workspace also disconnects the sync.

Repository rename and move rules differ by provider. On GitHub and Bitbucket, the sync follows a renamed repository, a renamed account, organization or workspace, and a repository moved to another account, organization or workspace that your Lovable workspace also has a connection to; a move to a destination without a connection disconnects the project. On GitLab, renaming or moving the project or its group breaks the sync, and the page makes no exception for destinations that have a workspace connection.

Other cautions from the page: pushing to the repository never publishes your live site; the repository holds migration files but never database data; Lovable does not deploy changed Edge Functions or run new migration files that arrive through Git, so you ask Lovable in chat or run SQL yourself. In a project that uses Lovable's built-in backend, the repository's .env file carries that backend's URL and publishable key (for example VITE_SUPABASE_URL and VITE_SUPABASE_PUBLISHABLE_KEY). A local app that keeps that configuration reads and writes the same backend as the published app, so local tests can change real data, and a Git branch does not give you a separate database. Variables prefixed VITE_ are sent to the browser, so secrets must not go in them. Secrets stored in Lovable stay out of the repository, and connector and Lovable AI credentials cannot be copied out. In newer apps created from May 13, 2026 that use TanStack Start, connector and AI calls fail locally and must be tested in preview or the published app.

Rewriting history on the synced branch can replace Lovable's work, and only the project owner can restore it. Email addresses in commit messages are visible to anyone who can read the history, so the page advises against the setting for public repositories.

Reasoning behind this assessment

The page earns a favourable reading for usefulness because it is specific rather than promotional. It names exact settings locations, exact status labels, the lovable-sync fallback branch, the 50-commit comparison window, the 24-hour restore notice and the concrete cases where behaviour differs by provider. It warns about hazards (force-push, shared backend, VITE_ variables, public repositories) instead of hiding them.

Confidence is limited because the evidence is a single page written by the vendor and its runtime behaviour is unverified. Exact permission scopes and prices are unknown from this evidence. The page links separate provider pages for setup steps, exact role requirements and troubleshooting, but those linked pages are not part of this snapshot, so their contents are unknown.

Alternatives and related options

The page itself names several adjacent options. For a one-off copy of your code, Download codebase in Project settings → Git or at the bottom of the Code editor's file tree is described as available on paid plans, and it does not require Git sync. For an app that needs to call the GitHub REST API to read repositories, issues and pull requests, it points to a separate GitHub API connector rather than Git sync. For deploying elsewhere it links to a page on deployment, hosting and ownership options.

Between providers, the page suggests using whichever platform your team already uses. The evidence does not cover other ways to get code out of Lovable or other tools with their own Git integrations, so those are unknown here.

Evidence base

The only evidence is a full capture, taken on 2026-11-13, of Lovable's documentation page 'Sync your Lovable project code with GitHub, GitLab, or Bitbucket' at [https://docs.lovable.dev/integrations/git-sync-overview.md]. The capture covers the complete selected page. Linked pages are excluded.

The evidence contains no code, repository contents, licence file or test output. All behavioural claims are the vendor's documented claims rather than observed results, so runtime behaviour is unverified.

Access & freshness

Costs

The page gives no prices. It does state plan availability: GitHub, GitLab.com, Bitbucket Cloud and self-managed GitLab are available on all plans; GitHub Enterprise Cloud with data residency and GitHub Enterprise Server need the Enterprise plan; the Include member email addresses in commits setting is available on Business and Enterprise plans; and Download codebase is described as available on paid plans.

On credits, the page says editing and committing code on your own computer uses no Lovable credits, while changes you ask Lovable to make in project chat consume credits as usual. Calls from a local app to your Cloud backend or the AI Gateway count as Cloud and AI usage like calls from the published app, and external services bill you directly. Actual plan prices and credit amounts are unknown from this evidence.

Rights and ownership

The page says the repository is one you own, in an account you control, and that it remains yours when you disconnect: Lovable deletes no code on either side. It does not state a licence for the documentation page itself, and it does not set out Lovable's terms of service or any ownership terms for generated code, so those are unknown from this evidence.

Practical rights points the page does make: Lovable treats code you wrote the same as code it generated and may change either in later requests. Commits are pushed under the Lovable GitHub app or the connecting account rather than under the triggering member. Email addresses added by the optional attribution setting stay in history once pushed.

Freshness

The page was captured on 2026-11-13. It shows no explicit publication date, last-updated date or version number. The page mentions a May 13, 2026 cutoff for when apps were created, but its own publication and revision dates are unknown.

Because Lovable is a hosted product, its behaviour, plan names, labels and limits may change without this page changing in step. Check the live documentation before relying on any specific label, role rule or plan restriction.

Suggested next steps

If you are deciding whether to use Git sync: pick the provider your team already uses, then read the matching provider page for connection steps and exact role requirements. Those details are not on this overview page. Try it on a non-critical project first and confirm the sync status card behaves as described.

If you will work locally: keep local edits on a feature branch. Lovable can remain on the synced branch, usually main; if main requires pull or merge requests, give Lovable its own feature branch and merge its changes through that process. Check the status card shows in sync before cloning, and avoid force-push, rebase or squash on the synced branch. If the project uses Lovable's built-in backend and your local copy keeps the repository's .env configuration (the backend URL and publishable key), use test accounts and records, because the local app then reads and writes the same backend as the published app. Ask Lovable in chat to deploy Edge Functions or apply database changes. Publish from Lovable when you want users to see the change.

If you need an audit trail: a workspace owner or admin on a Business or Enterprise plan can enable commit attribution, but avoid it for public repositories because addresses cannot be removed later without rewriting history yourself.

Evidence for this report

selected-page.txtselected · checked 2026-11-13