Can I import an existing GitHub repo into Lovable?
Not directly in the usual sense. Connect GitHub to a new Lovable project, select an existing repository, and Lovable will read and work with that code. If you have an old repo with code, you can start a new Lovable project, connect to that repo, and Lovable will sync it. Changes you make in Lovable will push to that repo.
Can I start a project by importing code from an external source such as GitHub?
Lovable doesn't support importing existing code as a starting point. Instead, you can remix an existing Lovable project or start from scratch with a prompt. You can later connect a GitHub repo for two-way sync after creating your project.
Do I need to know GitHub to use this feature?
No, you don't need to be a GitHub expert. Lovable handles most setup automatically—just click Connect GitHub, authorize the Lovable app, and select a repository. Changes sync two-way: edits in Lovable push to GitHub, and commits to the default branch pull back into Lovable. You can view code on GitHub anytime, but don't need to manually manage branches or commits.
How can I switch to a different GitHub account?
Disconnect the current GitHub integration in Lovable (Project Settings → Integrations → Disconnect). Then click Connect GitHub and sign in with the different GitHub account. Authorize the Lovable app for the new account and select a repository. Your old code stays in the original repository; this just points Lovable to a new one.
How to connect a GitHub repo to Lovable
In your Lovable project, enable the GitHub integration and authorize the Lovable GitHub App. Lovable will set up two-way sync: changes in Lovable auto-sync to GitHub on your default branch, and changes in GitHub sync back automatically. You always own the code, and you can clone or download from GitHub anytime.
Lovable can't access my repository — what should I do?
Lovable needs permission to access your repo. Check: (1) Authorize the Lovable GitHub App in your GitHub account Settings → Applications. (2) If it's an org repo, ensure the app is authorized for that organization. (3) Check that the repo still exists and hasn't been deleted. (4) Reconnect GitHub in Lovable and re-authorize. If still stuck, the Lovable app may need reinstallation—disconnect and reconnect.
The repo ended up in the wrong organization — can I move it?
You can move the repository to the correct GitHub organization through GitHub's settings (requires organization permissions). After moving, disconnect GitHub in Lovable, then reconnect and select the repo at its new location. Sync will resume from there. Your code is preserved; you're just updating Lovable's connection.
What happens if I rename my GitHub username or organization?
If you rename your GitHub username or organization, the existing repository path changes. Lovable's sync will break. Disconnect GitHub in Lovable, then reconnect and select the renamed repository (now at the new path). Your code remains in the renamed repo; you're just re-establishing the sync connection.
What happens if I rename, move or delete my GitHub repository?
Don't rename, move, or delete the repository after connecting to Lovable—it breaks the sync permanently. If you must rename it, disconnect from GitHub first in Lovable, then rename the repo. To reconnect after renaming, use Connect GitHub again and select the renamed repo. You'll need to re-authorize the sync, but your code stays intact.
Why don't my commits appear in Lovable?
Lovable only syncs with your default branch (usually main or master). If commits are on a different branch, Lovable won't see them. Ensure commits are merged to the default branch. If changes still don't appear, reconnect GitHub (disconnect and reconnect). There's a short sync delay—if you committed moments ago, wait a few minutes for Lovable to pull changes.
