Sync an app with GitHub

Connect an app to a GitHub repository, push its code there, check what changed on GitHub and import it back, with a saved version before every import.

GitHub sync keeps a copy of your app's code in your own GitHub repository. It is useful when a developer works on the code in their own tools, or when you simply want your code outside the platform too. Each app connects separately, in the Studio: Settings, then General Settings, then the GitHub Connection section.

Connect and push

1. Open GitHub Connection: In the Studio click Settings, choose General Settings, and open the GitHub Connection section. Click Connect to GitHub. A GitHub window opens; sign in there and approve. If the browser blocks the window, allow pop-ups for finestructure.ai and try again.

2. Choose the repository: Pick a repository from Select a repository... and click Use this repository. The section then says Connected to with the repository and the branch (main by default).

3. Push to GitHub: Click Push to GitHub. All the app's source files go to the branch as one commit, and the screen shows how many files were pushed and the commit. Last push shows the latest one.

Bring changes back from GitHub

1. Click Preview pull: Fine Structure reads the branch and says how many files are new and how many changed, without touching your app yet. Files it cannot import are counted as skipped.

2. Click Import from GitHub: The new and changed files are written into the app. Before writing, a saved version of the app is made, so you can go back in Versions. Files that exist only in your app are kept.

Button | What it does | Changes your app?

Preview pull | Reads the branch on GitHub and says "GitHub has 3 new and 5 changed files". A summary line also counts unchanged and skipped files. | No. It only looks.

Import from GitHub | Writes those new and changed files into your app, after saving a version you can go back to. The screen then says how many were imported and from which commit. | Yes.

When GitHub changed since your last sync: If someone pushed to the branch after your last push or import, a new push is stopped with a message that the branch changed. Import the latest changes first, then push again. If the branch changed between your preview and the import, run the preview again.

Limit | Value

Files read in one import | Up to 500 text files and 5 MB in total. Images and other binary files are skipped.

Files an app may hold | Your plan's file limit (500 files on Quark, 1,500 on Photon, 3,000 on Atom, 10,000 on Fusion and above, by default). An import that would pass it is stopped.

Disconnect removes the link to the repository. Your code stays in GitHub and in the app. Apps installed as a product with locked source do not show this section.

Questions

Q: Do I need a paid plan?

A: GitHub sync is part of every plan, including Quark. If your plan does not include it, the section says so and offers an upgrade.

Q: Can I sync two apps to the same repository?

A: Each app has its own connection. Use a separate repository or branch for each app so they do not overwrite each other.

Q: Will an import delete files in my app?

A: No. It adds new files and updates changed ones. Files that are only in your app stay.

Q: The section says GitHub OAuth is not configured yet.

A: That message is for a server without GitHub set up. On finestructure.ai, contact support if you see it.

Q: "The browser blocked the GitHub popup. Allow popups and try again."

A: Your browser stopped the GitHub window. Click the blocked-window icon in the address bar, allow pop-ups for finestructure.ai, and click Connect to GitHub again.

Q: "Could not start the GitHub connection."

A: The connection did not start on our side. Wait a minute and try again; if it repeats, open a ticket.

Q: "GitHub sync is not available on the current plan."

A: Click Upgrade to connect GitHub to see the plans that include it.

Q: "The GitHub branch changed since the last sync. Import latest changes or push to a new branch."

A: Someone pushed to GitHub after you. Click Preview pull, then Import from GitHub, and push again. If you see "changed since preview", run Preview pull again before importing.

Q: "GitHub token does not have push access to this repository"

A: The GitHub account you connected can read the repository but not write to it. Ask the owner of the repository to give that account write access, or pick a repository of your own.

Related: The Code tab, Saved versions and restore, Studio settings, section by section, Import an existing website or project