Sync your Lovable project with GitHub - Lovable Documentation
Documentation Index Fetch the complete documentation index at: /llms.txt Use this file to discover all available pages before exploring further. Skip to main content Assistant Responses are generated using AI and may contain mistakes. When you build with Lovable, your project code is stored and managed inside the Lovable platform. GitHub is a platform for hosting, managing, and collaborating on code, with version control, pull requests and code reviews, and CI/CD through GitHub Actions.
If you want your own copy, plan to collaborate with developers, or move your project elsewhere, you can export and sync your project to GitHub: back up your code, review changes in pull requests, work locally in your IDE, test features on branches, and deploy outside Lovable. On the Enterprise plan, you can also keep a copy of your code within your own infrastructure with GitHub Enterprise. For the full picture of what Git sync is, how the two-way sync model works across providers, and how to choose between GitHub, GitLab, and Bitbucket, see the Git sync overview .
This is a Git sync integration for Lovable projects. You can export and two-way sync your Lovable project code with github.com, GitHub Enterprise Cloud, or GitHub Enterprise Server. Want your app to call the GitHub REST API to read or update repositories, issues, and pull requests instead? Use the GitHub API connector . You don’t need GitHub to use Lovable. Many users build and launch entirely within Lovable. If you only need a copy of your code, you can download your code directly from Lovable: use the Download codebase section in Project settings → Git , or open the Code editor and click Download codebase at the bottom of the file tree sidebar (paid plans).
How GitHub Git sync works Like all Git sync , the GitHub integration has two layers: A workspace connection A project repository link Workspace connection A workspace connection authorizes Lovable to access a GitHub account or organization through the Lovable GitHub app. This grants Lovable permission to create and update repositories in your chosen account or organization. Every project in the workspace can use the same workspace connection.
A workspace can contain: Multiple GitHub connections Multiple GitHub accounts and organizations Multiple GitHub connection types This is useful if your team works across personal accounts, client accounts, or multiple organizations. Project repository link A project repository link connects one Lovable project to one GitHub repository. When connected: Changes made in Lovable sync to GitHub Changes pushed to the active GitHub branch sync back into Lovable Lovable only edits and syncs one branch at a time GitHub Git sync connection types Lovable supports three GitHub connection types: github.com (available on all plans) The standard hosted GitHub platform used by most teams.
Lovable manages the GitHub app installation for you. GitHub Enterprise Cloud - Data residency (available on the Enterprise plan) GitHub Enterprise Cloud using a *.ghe.com hostname so repository data stays in a specific region. Lovable manages the GitHub app installation for you. GitHub Enterprise Server (available on the Enterprise plan) Self-hosted GitHub running on infrastructure your organization controls. With this setup, you create your own copy of the Lovable GitHub app inside your GitHub organization, so credentials remain under your control.
When you add a new connection, you choose which type to set up. All three types support the same two-way sync, branch operations, and pull request creation between Lovable and your GitHub repository. Role-based access for GitHub integration Role Allowed action Workspace owner or admin only Install the Lovable GitHub app on a new account or organization Add a workspace connection Update a workspace connection Reconnect a workspace connection (re-authorize the GitHub app for the workspace connection) Delete a workspace connection Enable or disable Include member email addresses in commits (Business and Enterprise plans) Workspace owner or admin Project owner or admin Connect a project to a repository Disconnect a project from a repository Reconnect a project to a repository Workspace editor or higher Project editor or higher View sync status Switch branches Create branches View the connection in Workspace settings → Git → GitHub Create a workspace GitHub connection Workspace admins and owners can create workspace connections from: Workspace settings → Git → GitHub → Add connection Project settings → Git → GitHub → Add connection (if a project has not been connected yet).
To use an existing GitHub installation , click Connect next to the account or organization you want to use. The list shows installations on accounts and organizations you have access to on your GitHub identity. If someone else installed the Lovable GitHub app on an organization you’re not a member of, you won’t see that installation. Ask them to add you to the GitHub organization, or to set up the Lovable workspace connection themselves.
To set up a new connection, follow the steps for your connection type: github.com GitHub Enterprise Cloud (data residency) GitHub Enterprise Server github.com GitHub Enterprise Cloud (data residency) GitHub Enterprise Server (self-hosted) github.com is the standard hosted GitHub service used by most teams. Available on all plans. You need to have a GitHub account. You can create one for free at github.com . 1 Add account Click Add account .
On Free, Pro, and Business plans, you’ll go straight to the github.com installation flow. On Enterprise plan, Lovable shows three connection types. Select github.com. 2 Install and authorize the Lovable GitHub app A GitHub popup opens. Choose the account or organization. Choose All repositories or Only select repositories . Click Install & Authorize . Lovable automatically detects the installation and adds it as a reusable workspace connection.
You can now link projects to repositories under this account or organization. Use this option if your organization runs GitHub Enterprise Cloud on a *.ghe.com hostname to keep repository data in a specific region. This setup requires a Lovable Enterprise plan. 1 Add account Click Add account . On the host selection step that appears, choose Data residency . 2 Allow Lovable's IP ranges (if applicable) If your GitHub organization enforces an IP allow list , copy the IP ranges shown in the setup wizard and add them under GitHub organization → Settings → Security → IP allow list .
3 Enter your instance hostname Instance URL : Enter your data residency hostname, for example acme.ghe.com . The hostname must end with .ghe.com and must be reachable over HTTPS. Click Connect . 4 Install and authorize the Lovable GitHub app A popup opens to your data residency instance. Choose the account or organization. Choose All repositories or Only select repositories . Click Install & Authorize . Lovable automatically detects the installation and adds it as a reusable workspace connection.
You can now link projects to repositories under this account or organization. Use this option if your organization runs GitHub Enterprise Server on its own infrastructure. With this setup, you create your own copy of the Lovable GitHub app inside your GitHub organization, so credentials stay under your control. This setup requires: A Lovable Enterprise plan Organization admin access on your GitHub Enterprise Server to register and install the GitHub app Network access from Lovable’s public IP ranges 1 Add account Click Add account .
On the host selection step that appears, choose Server . 2 Allow Lovable's IP ranges Lovable must be able to reach your GitHub Enterprise Server to push code, verify repositories, and receive webhook events. Add the IP ranges shown in the setup wizard to: Your network firewall Or your GitHub organization IP allow list under Settings → Security → IP allow list 3 Enter your instance and organiza
The rest of this page is on the live site.