Connect to GitHub

On FlutterFlow you have an option to connect to your GitHub account and push your entire Flutter codebase to a GitHub repository. You can either use the Push to Repository option under the Developer Menu present on the Tool Bar, or you can directly do to the Settings and Integrations > GitHub tab.

Some points to keep in mind while using GitHub with FlutterFlow:

  • FlutterFlow pushes any changes to a new branch called "flutterflow", it doesn't modify anything present inside the other branches.

  • You should not make any direct changes to the flutterflow branch.

  • If you want to make any modifications to the code pushed by FlutterFlow, use a different branch. That way it won't get overwritten by FlutterFlow next time.

Follows the steps below to connect a GitHub repo to the FlutterFlow project:

1. Go to your GitHub account, create a new repo by clicking on the "+" button on the top-right corner and select New repository.

2. Enter the repository name and fill up other descriptions. Don't keep the repo empty, select Add a README file. Click Create repository.

If you keep the repository empty then it would not be initialized as there's no main branch. So, FlutterFlow would not be able to upload your project there.

3. Once the repo is created, go back to the Settings and Integrations page and move to Step 2. Click on the link present there to open the FlutterFlow GitHub App page.

Click Install and select the account to install on.

4. Choose Only select repositories and select the repo name that you created in Step 2 from the dropdown. Click Install.

5. Now, go back to the Settings and Integrations page and move to Step 3. You just have to copy the GitHub repository URL that you created and paste it in the Full Repository URL text field.

6. Click Associate Repo.

7. You will notice that a new button will appear, called Push to Repository. Click on it to upload your FlutterFlow code to the GitHub repo. This will upload the code on a new branch flutterflow.