Your code: download and GitHub
Download your site as a Next.js project or keep it in a repository in your GitHub that Berse keeps up to date.
Your site is yours. You can take it with you whenever you like: by downloading it, or by connecting it to a GitHub repository that Berse updates on its own.
Depending on your plan
Downloading your code and exporting it to GitHub come with every paid plan, from Hobby. See Plans.
You'll find it in each project's settings: in Studio, open Settings and scroll to Your code. Only people who can edit the project see it.
Download your site
Press Download next to Next.js project (.zip). You get the current version of your site, ready to run on your computer:
npm install
npm run devIt includes a README with the instructions and, if your site uses keys (forms, payments, map), a .env.example with their names. Berse never includes your keys' values.
Connect a GitHub repository
Choose how
Under GitHub, choose Create repository (Berse creates a new one, private by default) or Use an existing one.
Give permission on GitHub
A small GitHub window opens. The first time, it asks you to sign in and allow Berse; pick the account and, if you like, only the repositories you'll use. The window closes on its own and your page stays where it was.
Berse uploads your site
You'll see the steps: Permission on GitHub, Repository created and Uploading your site…. When it's done, Your site is on GitHub appears with a link.
Under Use an existing one you only see repositories you can write to, most recently changed first. A repository another of your sites already uses shows as Already connected to…: each repository holds one site.
When it updates
With Export on every saved version on (it is by default):
- When you edit in Design or Code, Berse waits until you pause editing for a few minutes and uploads everything in one update.
- Changes by Cortex, restoring a version or publishing are uploaded right away.
To upload something now, press Export now.
If someone changes the repository
If someone makes changes directly on GitHub, Berse won't overwrite them. It leaves its own changes aside in a proposal (a pull request) and tells you in the panel. Press Review and accept on GitHub and, on GitHub, Merge pull request. After that, Berse updates the repository directly again.
Files you add on GitHub stay: Berse only changes or deletes the ones it wrote.
What's never exported
For safety, Berse doesn't export files that would run on their own in your repository or on your computer, such as .github/workflows or git hooks.
If something's wrong
- "We need to ask GitHub again…": Berse checks every so often which repositories you can reach. Press Connect GitHub again: it's one click.
- "Berse can no longer write to this repository": the repository was deleted or moved, or Berse's access was removed on GitHub. Press Connect GitHub again or Choose another repository.
- "Paused": your plan no longer includes exporting code. Upgrade to keep going, or press Stop exporting.
Stop exporting leaves the repository on GitHub as it is. To manage all your GitHub accounts at once, see Connections.
