Skip to main content
After you connect your app to GitHub or GitLab, you can clone its repository and edit the code in your own tools. Base44 keeps your app and the repository in sync in both directions.

Set up your local environment

Set up your local repository to start editing code in your preferred development environment. To set up your local repository:
  1. Clone the repository using the project’s Git URL.
  2. Navigate to the project directory.
  3. Install dependencies: npm install.
  4. Install the Base44 CLI: npm install -g base44@latest.
  5. Authenticate: base44 login.
  6. Link the clone to its app: base44 link. The base44/.app.jsonc link pointer is gitignored, so every fresh clone needs this step.
Run the app locally:
This starts a local Base44 backend and your frontend dev server together. The frontend’s /api requests are proxied to the local backend. See Local development for what runs locally. To work on only the frontend against your app’s live hosted backend, run base44 dev --remote instead.
In remote mode, writes go to your live app’s production data.
For details on the exported file structure, see Project Structure.

Sync local changes to Base44

To sync your local changes to Base44, merge the changes to the main git branch. This branch must be named main. Other default branch names, such as master, currently aren’t supported. Base44 pulls the merged changes so that they appear in your app whenever you open or are in the app editor. After syncing, click Publish in the top right corner of your Base44 app to make the changes live for users.

Deploy backend features

Merging to main syncs your code to Base44, but it doesn’t deploy every backend resource. This table describes the behavior and required steps to deploy each resource after your project syncs:
Base44 syncs from your remote repository. Avoid deploying backend features with CLI deploy commands, such as base44 deploy, base44 functions deploy, base44 entities push, and base44 agents push. These commands register your backend features with Base44 directly and bypass the remote repository. The next time Base44 syncs from the repository, it overwrites any changes the repository doesn’t contain, including anything you deployed with CLI commands. To make sure your backend features sync correctly, merge your changes to main instead, and use base44 dev to test locally.

Sync remote changes locally

When you make changes in the Base44 app editor or restore an earlier version from Version History, Base44 pushes a new commit to main. Your local clone doesn’t receive these commits automatically, so it can fall behind the repository. Pull main into your local clone before you push again. Git rejects a push from a local project that doesn’t have the commits Base44 added.

Resolve merge conflicts

A merge conflict occurs when a commit in your repository and a change in Base44 edit the same lines of a file. Base44 can’t handle merge conflicts automatically. Instead, the AI chat lists the conflicting files and prompts you to click Resolve Conflicts with AI, which uses credits.