# Keep your pages up to date (https://www.dessn.com/docs/your-code/keep-up-to-date)

Bring new code into your Library, pick the branch Dessn follows, and update a folder project.

Your [Library](https://www.dessn.com/docs/getting-started/design-library) is built from one branch of your code. When that branch moves on,
bring the new code in, and your pages update in place. Files and frames you've made stay as they are.

## See where your Library is
The top of the Library says how current it is:

- **Up to date with main · compiled 3h ago**: it has your latest code.
- **Your Library is 2 days behind your code**: the branch has commits your Library doesn't have yet. Hover it to see how
  many.
- **Updating to your latest code…**, then **Updating pages…**: new code is coming in. Your pages stay as they are until the
  new ones are in.

## Bring in new code
<Tabs items={['From the Library', 'From Settings']}>
<Tab value="From the Library">

Press **Sync now** at the top of the Library (or **Update** when it's up to date).

</Tab>
<Tab value="From Settings">

Open **Settings › Sync status** and press **Sync latest code now**. The page also shows the repository, the branch and
when the Library was last updated.

</Tab>
</Tabs>

On Free, your Library is set up once from your code, and the button reads **Sync with Pro**. Syncing whenever you like,
and the daily check, are part of [Pro](https://www.dessn.com/docs/billing).

### The daily check
On Pro, Dessn checks your branch for new commits once a day and syncs any changes by itself. It covers GitHub and your
team's own Git server. For GitLab.com and Bitbucket, press **Sync latest code now** after you push. A project nobody has
opened for 7 days is skipped; it syncs the next time someone opens it.

## Change the branch
Open **Settings › Sync status**, press **Change branch** and pick one. Dessn lists **Branches with recent work**, and
says so when your newest work is on another branch.

Switching sets your Library up again from that branch. It takes a few minutes, as setup does, and it's free on every
plan. Your own files and chats stay as they are, and the Library follows the new branch from then on.

## Update a folder project
If you [uploaded a folder](https://www.dessn.com/docs/getting-started/connect-your-code), open **Settings › Sync status** and, under **Your
uploaded folder**, press **Update from folder**. Pick the folder again, check the changes, and press **Upload changes**.
This is on Pro.

To move a folder project to GitHub, press **Connect GitHub instead** on the same page. It stays the same project.

<Accordions>
<Accordion title="Does a frame I made change when the Library updates?">
No. A frame you or Petal changed keeps its own code. In its changes, **Compare with the latest Library** shows how it
differs from your newest code.
</Accordion>
<Accordion title="Does a push to GitHub update the Library at once?">
Not on GitHub.com: the daily check picks it up, or press **Sync latest code now**. On your team's own GitHub Enterprise
Server or self-managed GitLab, Dessn can update on every push: see [Git hosts](https://www.dessn.com/docs/git-hosts).
</Accordion>
<Accordion title="I only have view access">
Viewers can't sync. Ask an admin or an editor.
</Accordion>
</Accordions>
