KBAISE/ for lovable
Library
Docs

Sync your Lovable project with Bitbucket

about 10 minBuildingchecked 2d agoOfficial page
The short version

You can connect your Lovable projects to Bitbucket Cloud to automatically save your code, work with others, and set up deployments. This creates a two-way sync, so changes in Lovable go to Bitbucket, and changes pushed to Bitbucket come back to Lovable.

Anyone who wants to back up their Lovable project code, collaborate with others, or use Bitbucket's features for deployment.

Do this, in order

  1. 1

    Go to your Lovable workspace settings, find the 'Git' section, and then 'Bitbucket'.

    This is where you start the process of linking Lovable to your Bitbucket account.

  2. 2

    Click 'Add connection' and then 'Authorize with Bitbucket'.

    This opens a new window for you to securely sign in to your Atlassian account and give Lovable permission to access your Bitbucket workspaces.

  3. 3

    Select the Bitbucket workspace you want to connect from the list and click 'Connect'.

    This links a specific Bitbucket workspace to your Lovable workspace, allowing Lovable to create and manage repositories within it.

  4. 4

    Go to your Lovable project's settings, find the 'Git' section, and then 'Bitbucket'.

    This is where you connect a specific Lovable project to a Bitbucket repository.

  5. 5

    Under 'Connect project', click 'Connect' next to the Bitbucket workspace you just linked.

    Lovable will automatically create a new, private repository in your chosen Bitbucket workspace and start syncing your project's code to it.

Paste this into your project

I want to sync my Lovable project with Bitbucket. Please connect my Lovable workspace to my Bitbucket Cloud workspace and then link my current project to a new private repository in Bitbucket. I understand Lovable will create a new repository for my project.

Words decoded

Bitbucket Cloud
An online service by Atlassian for storing and managing software code, similar to Google Drive for documents, but specifically for code.
Workspace connection
A link that gives Lovable permission to access a specific area (workspace) within your Bitbucket account.
Project repository link
A specific connection between one of your Lovable projects and a single code storage area (repository) in Bitbucket.
Repository
A dedicated storage space for your project's code and its history, like a folder for all your project files.
Two-way sync
When changes made in Lovable are automatically sent to Bitbucket, and changes made in Bitbucket are automatically sent back to Lovable, keeping both copies identical.
Webhook
An automatic notification sent from Bitbucket to Lovable whenever something important happens, like new code being added.
Branch
A separate version of your project's code where you can make changes without affecting the main version, like making a copy of a document to edit before merging it back into the original.

Where people get stuck

  • Do not delete your Bitbucket repository or move it to a Bitbucket workspace not connected to Lovable, as this will break the sync.
  • You cannot import existing Bitbucket repositories into Lovable; Lovable always creates a new repository when you connect a project.
  • You cannot reconnect to the *same* Bitbucket repository after disconnecting; Lovable will create a new one.
  • Lovable only supports Bitbucket Cloud (bitbucket.org), not self-hosted Bitbucket Data Center or Bitbucket Server instances.
  • A newly created Bitbucket workspace might have a short delay before it can receive pushes, so wait if Lovable indicates a delay.
  • You need admin access to the Bitbucket workspace you want to connect to Lovable.

The short version, steps, decoder and prompt on this page are written automatically from Lovable's own documentation and can lag or misread it. The official page is always the authority.