Lovable GitHub Sync Broken? Complete Fix Guide
When Lovable's GitHub sync breaks, the editor stops pushing your changes and the error messages are rarely self-explanatory. This pillar guide maps every known error string to its documented cause and the exact recovery steps — from 'repository is no longer accessible' to a broken app installation. Work through the failure matrix first; if nothing matches, the reconnect section covers the full reinstall path.
By Hire Lovable Xperts · Last verified: 2026-06-24
What causes Lovable GitHub sync to break?
Lovable pushes code directly to the default branch (usually main) in a connected GitHub repository whenever you make a change in the editor. Sync fails when the Lovable GitHub App loses access to that repository — most commonly because the repo was renamed, transferred to another organisation, deleted, or because the app installation was revoked. None of these are fixable by prompting Lovable to 'try again.'
Lovable documents four specific failure modes: (1) the connected repository was renamed or moved, which breaks the stored path permanently; (2) the app installation was revoked from the GitHub account or organisation settings; (3) the repository was deleted; and (4) the Lovable GitHub App was uninstalled at the organisation level. In each case the fix requires action in GitHub, not in the Lovable editor.
A fifth failure mode is permissions drift — the app was installed at the account level with access to 'selected repositories,' and the connected repo was later excluded from that list. This produces a 404 during the sync handshake without an explicit error in the Lovable UI.
| Error / Symptom | Root Cause | Fix |
|---|---|---|
| This repository is no longer accessible | Repo renamed, transferred, or deleted after connection | Restore original repo name; or disconnect and reconnect to the new repo — reconnecting creates a NEW repo |
| we couldn't find the Lovable GitHub app installation | App was uninstalled from the GitHub account or org | Reinstall Lovable GitHub App from github.com/apps/lovable-dev; grant access to the repository |
| it sends me to a 404 (reconnect flow) | App installation revoked mid-reconnect or repo access removed | Complete a fresh app installation; do not retry the broken reconnect URL |
| Sync stopped — no explicit error shown | Repository excluded from the app's 'selected repositories' list | Go to GitHub → Settings → Applications → Lovable → Repository access; re-add the repo |
| lovable-sync-<timestamp> branch appears unexpectedly | Push to default branch (main) was rejected — branch protection or non-fast-forward conflict | Resolve the protection rule or conflict on main, then merge the lovable-sync-<timestamp> branch into main |
| lovable-fallback branch used instead of default branch | The branch Lovable was synced to was deleted on GitHub; Lovable switched to a new fallback branch | Merge lovable-fallback into your default branch; ensure the default branch is not deleted in future |
| Changes not appearing in GitHub after prompt | App installation exists but lacks write permission to the repo | Reinstall with write access; check the app's repository permissions in GitHub Settings |
Does renaming my GitHub repo break Lovable sync permanently?
Yes. Lovable stores the full repository path at the time of connection — including the owner name and repository name. If either changes, the sync endpoint becomes invalid. This is vendor-documented behaviour: Lovable has no automated recovery for a renamed or moved repository. The only self-service fix is to restore the exact original repository name.
This also applies to GitHub organisation renames and repository transfers. If you transfer a repository from your personal account to an organisation — or rename the organisation — the stored path no longer resolves, and Lovable will report it as inaccessible. Restoring the original name resolves it; leaving the new name requires a full disconnect and reconnect, which creates a new repository.
A common mistake is clicking the 'Reconnect' button in the Lovable editor without first fixing the repository name. The reconnect flow will attempt to connect to the current name, create a new repository if the original is gone, and begin pushing to a brand-new repo — leaving your history in the old one. Restore the name first, then reconnect.
How do I reinstall the Lovable GitHub App after a 404?
The 'it sends me to a 404' error during reconnect means the current app installation is invalid — either the app was uninstalled or its access token expired mid-flow. The fix is a clean reinstallation of the Lovable GitHub App, not a retry of the broken reconnect URL. Follow these steps in GitHub first, then return to Lovable.
- Go to github.com/apps/lovable-dev and click 'Configure' (or 'Install' if no installation exists).
- Select the account or organisation that owns the connected repository.
- Under 'Repository access,' select 'All repositories' or explicitly add the connected repository.
- Click Save and complete the OAuth authorisation if prompted.
- Return to the Lovable editor and click 'Connect to GitHub' — the app installation should now resolve correctly.
- Verify a new commit appears on the default branch (main) in your GitHub repository within a few minutes of making a change in the editor.
What are the lovable-sync-<timestamp> and lovable-fallback branches?
Lovable syncs editor changes directly to your repository's default branch (usually `main`) by default. Two special branches exist only as fallbacks: `lovable-sync-<timestamp>` is created when a push to main is rejected — for example by a branch-protection rule or a non-fast-forward conflict. `lovable-fallback` is created when the branch Lovable was synced to was deleted on GitHub. Neither is Lovable's normal push target.
When Lovable creates a `lovable-sync-<timestamp>` branch, the editor displays a message: 'To avoid losing your work, Lovable pushed it to a new lovable-sync-<timestamp> branch instead.' This means something on the default branch is blocking the push — resolve the branch-protection rule or merge conflict, then merge the timestamped branch into main to consolidate the work.
If `lovable-fallback` appears, the branch Lovable was previously synced to was deleted in GitHub. Lovable automatically switches to the new fallback branch to preserve changes. Merge lovable-fallback into your default branch and confirm the default branch is no longer deleted before your next session.
Can I import an existing GitHub repo into Lovable?
Not as a sync target. Lovable's docs say Git sync always creates a new repository, so a broken sync can't be repaired by pointing the project at some other existing repo. Existing code can come in only as a one-time ZIP import that rebuilds the app as a new project. That is a separate workflow from repairing sync, with its own steps and limits.
The practical implication for a broken sync: repair the connection to the repository Lovable created, or reconnect and let Lovable create a new one. Because Git sync is two-way on the synced branch, work you do in your own editor reaches Lovable once you push it to that branch.
Copying files from an unrelated repository into the synced repository is not a supported workflow. If the goal is to bring that code into Lovable, import it as a ZIP instead.
Related: import an existing GitHub repo into Lovable as a ZIP
When should I disconnect and reconnect GitHub entirely?
Disconnect and reconnect is the correct path only when the original repository no longer exists and cannot be restored — for example, if the repo was deleted and cannot be recovered from GitHub's 30-day trash window. In every other case, restoring the original repo name is faster and preserves your push history. Reconnecting always creates a new repository and starts history fresh.
- Confirm the original repository is unrecoverable: check GitHub → Your repositories (including trash) for deleted repos within the 30-day recovery window.
- If recoverable, restore it — GitHub offers a restore option for recently deleted repos. Then re-run the GitHub App installation to re-grant access.
- If not recoverable, go to the Lovable editor → Settings → GitHub → Disconnect.
- Click 'Connect to GitHub' and complete the flow — Lovable will create a new repository.
- Note: your commit history from the old repository is not transferred. Back up any commits you need before disconnecting.
Related: recover a deleted GitHub repo within the 30-day window
Frequently asked questions
Why does Lovable say 'This repository is no longer accessible'?
Does renaming my GitHub repository break sync permanently?
Can I import an existing GitHub repo into Lovable?
What does 'we couldn't find the Lovable GitHub app installation' mean?
Why does my reconnect flow go to a 404?
What is a lovable-sync-<timestamp> branch and do I need to merge it?
Why did Lovable create a lovable-fallback branch?
Is there a way to use Lovable with a repo I already have code in?
How long does it take for Lovable changes to appear in GitHub?
When should I get a senior engineer to fix my GitHub sync?
App down or leaking data? Get an expert on it within 24–48h.
Book a free 30-minute audit call. We'll diagnose what's wrong and tell you exactly what it costs to fix.