-
Notifications
You must be signed in to change notification settings - Fork 74
desloppified GitHub integration #117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…ome more work to clarify
Summary of ChangesHello @EliasBelfr, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly overhauls the documentation for the GitHub integration within Lovable, aiming to simplify the explanation and usage for users. The core purpose has been refined to focus on exporting Lovable projects to GitHub for backup or migration, rather than detailing a comprehensive, real-time synchronization and collaborative development guide. This change effectively 'desloppifies' the content, making the integration more accessible and easier to understand, especially for users who may not require advanced Git workflows. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request does a great job of simplifying and shortening the GitHub integration documentation, making it more accessible. The new structure is much clearer. However, in the process of shortening the content, some important details have been lost, and a few inaccuracies and typos have been introduced. My review includes suggestions to restore crucial information, clarify potentially misleading statements, and fix minor grammatical issues to improve the overall quality and correctness of the document.
As a general style point, I've noticed several contractions ('don't', 'won't', 'it's', etc.) throughout the document. While this makes the tone more conversational, it's generally recommended to avoid them in technical documentation to improve clarity for all readers, including non-native English speakers.
|
|
||
| Lovable backs every project with a Git repository, making it easy for developers to push commits directly to GitHub. This means: | ||
| - You'll need a GitHub account: If you don't have one, you can create a free account at github.com | ||
| - Your code moves to GitHub: Once you transfer your project, Lovable doesn't keep a separate copy. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This statement, "Lovable doesn't keep a separate copy", is confusing and seems to contradict the two-way sync functionality described on line 30. For a two-way sync to work, Lovable must maintain a working copy of the code. This sentence could cause confusion or concern for users. Please clarify how the code is handled by Lovable after connecting to GitHub. For example, you could state that GitHub becomes the 'source of truth' but Lovable still syncs with it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@EliasBelfr thoughts on this?
|
|
||
| If the sync doesn’t re-establish automatically after restoring the repo, try refreshing your Lovable project or navigating to the GitHub settings within the UI to verify the connection. | ||
| <Accordion title="How do I switch the GitHub account if I connected the wrong one?"> | ||
| Unfortunately, you cannot switch the GitHub account once it’s been connected to a Lovable account. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This statement is not entirely accurate. While you cannot directly switch the connected GitHub account for a project, there is a workaround by remixing the project, which was mentioned in the previous version of this document. This is important information for users who may have connected the wrong account. I suggest adding this workaround back. For example:
While you cannot directly switch the GitHub account for a connected project, you can achieve this by following these steps:
1. **Remix the Project:** Create an exact copy of the project by remixing it from the project settings. This copy will not be connected to GitHub.
2. **Connect the copy to GitHub:** In the new (remixed) project, connect to GitHub and authorize the correct GitHub account.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@EliasBelfr I noticed this one also, maybe bundle it in one question?
| --- | ||
| title: "GitHub integration" | ||
| description: "Learn how to connect and sync your projects with GitHub repositories" | ||
| description: "Learn how to export your projects to GitHub" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description focuses on 'exporting' projects, which might be misleading. The integration provides a continuous two-way sync, not just a one-time export. Using 'connect' or 'sync' would be more accurate and better manage user expectations.
description: "Learn how to connect and sync your projects with GitHub"
| Enter your GitHub username and password | ||
| </Step> | ||
| <Step> | ||
| GitHub will ask you to authorize the Lovable app in your account or organizatons. This means you're giving Lovable permission to create and update your code repository on GitHub. Click Authorize to continue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| GitHub will ask you to authorize the Lovable app in your account or organizatons. This means you're giving Lovable permission to create and update your code repository on GitHub. Click Authorize to continue. | ||
| </Step> | ||
| <Step> | ||
| After authorizing, you'll be able press **Connect GitHub** again and choose which GitHub organization (your account or team account) should store your code. Select the one you want from the list. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The grammar here is slightly incorrect. It should be 'you will be able to press' or more simply 'you can press'.
After authorizing, you can press **Connect GitHub** again and choose which GitHub organization (your account or team account) should store your code. Select the one you want from the list.
|
|
||
| Keep in mind that all collaborators will now be pushing to the new default branch by default. Update your team or documentation to avoid confusion. Lovable will now ignore the formerly default branch (it will only pay attention to the new one). If needed, you can always switch back by re-designating the old branch as default in GitHub settings. | ||
| <Accordion title="What if I rename my organization or change username inside of GitHub?"> | ||
| If you rename your organization or change username Lovable won't be able to find the repository anymore. Your project will stop syncing, and you won't be able to edit it in Lovable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
|
||
| This approach ensures your new org connection is clean and your project remains stable. | ||
| <Accordion title="Can I import an existing GitHub repository into Lovable?"> | ||
| Currently, Lovable does not support directly importing or linking to an existing external GitHub repo as a new project. In other words, you can’t point Lovable at an existing repository and have it pull in all that code automatically. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line contains a hidden zero-width space character (U+200B) at the end of project. These characters can cause issues with some markdown parsers and should be removed.
Currently, Lovable does not support directly importing or linking to an existing external GitHub repo as a new project. In other words, you cannot point Lovable at an existing repository and have it pull in all that code automatically.
|
|
||
| This is the only way to get back up and running. | ||
| <Accordion title="The repo is in the wrong organization or location, can I move it?"> | ||
| No, sadly not. However, there is one workaround. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
haha, yeah, no emotions in docs please :) @EliasBelfr
| 1. **Remix the Project:** Create an exact copy of the project by remixing it from the project settings. This copy won't be connected to GitHub. | ||
| 2. **Connect the copy to GitHub** | ||
| 3. **Select the Correct Organization or location** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The formatting of this list is inconsistent, and the last item is a bit vague. For clarity and consistency, I suggest giving each step a bolded title and making the language more precise.
1. **Remix the Project:** Create an exact copy of the project by remixing it from the project settings. This copy won't be connected to GitHub.
2. **Connect the New Project:** In the remixed project, follow the steps to connect to GitHub.
3. **Select the Correct Organization:** During the connection process, choose the correct organization.
| </Accordion> | ||
| </AccordionGroup> | ||
| <Accordion title="Why aren’t my commits showing up in Lovable?"> | ||
| The most common reason is that the commits were made on a branch that Lovable isn’t tracking. Lovable only syncs with the repository’s **default branch**(usually main). To fix this, merge the branch into the default branch or [switch](/features/labs) branch inside of Lovable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a missing space before the opening parenthesis, which makes it harder to read.
The most common reason is that the commits were made on a branch that Lovable isn’t tracking. Lovable only syncs with the repository’s **default branch** (usually main). To fix this, merge the branch into the default branch or [switch](/features/labs) branch inside of Lovable
| <Step> | ||
| Click **Transfer Anyway** to finish. Your code is now in your own GitHub repository! | ||
| </Step> | ||
| </Steps> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@EliasBelfr Just want to double-check the steps were tried out as I see significant difference now?
| - **Conflict Handling:** Because both Lovable and GitHub can change the code, there’s a chance of a git conflict if changes happen on the same file at the same time. In practice this is rare, but if a conflict does occur, you would resolve it just like any Git conflict. For example, you might need to go to the GitHub repo and manually merge or fix conflicting changes, then commit. Lovable will then pull the resolved code. To avoid conflicts, it’s best to coordinate who is editing or use branches for larger changes (merging to main when ready). | ||
|
|
||
| In summary, the GitHub integration means your Lovable project’s code and the GitHub repository are effectively one and the same source, mirrored in real time. You can confidently switch between the Lovable editor and other development tools knowing both will stay updated | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@EliasBelfr Not an expert, but feels like some of this info might still be relevant, but can probably be significantly shorter, or scattered around in different sections of the doc as it makes sense, or maybe an FAQ with most important bits? What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing, but please take a look at my comments before merging
to remove unnecessary fluff, needs some more work to clarify certain parts