# Import, export and Git

Bring the notes and files you already have into a Space, download everything again at any time, or work on a Space with Git.

Web version: https://www.svanja.com/docs/import-export-and-git/

You don't have to start from scratch in Svanja, and your notes are never locked in. You can bring existing notes and files into a [Space](https://www.svanja.com/docs/spaces/), like an Obsidian vault or a folder from your computer. You can also download a Space, or all your data, as a zip file whenever you like.

Behind the scenes, each Space is a Git repository. Git is a tool developers use to store files along with their full history. If you use Git, you can copy a Space to your computer, edit it there, and send your changes back.

## Bring files into a Space

Importing copies notes and files into a Space. You can review what comes in before anything is added.

1. Open the Space from [Spaces](https://app.svanja.com/spaces).
2. Next to **New note** and **Upload**, open the three-dot menu.
3. Choose **Bring files in**.
4. Under **Where from**, choose the source.
5. Optional: under **Put the files in this folder**, choose a folder. Leave it empty to keep the source's own folders at the top level.
6. Choose **Choose zip file** or **Choose folder** and pick it. For a Git repository, enter the **Repository address** and choose **Check files**.
7. Check the list of what comes in.
8. Choose **Import**.

![The Studio website Space open on the Files tab](https://www.svanja.com/images/docs/import-export-and-git/import-1.webp "Open the Space you want to bring files into.")
![The three-dot button next to New note and Upload above the folder list](https://www.svanja.com/images/docs/import-export-and-git/import-2.webp "Open the three-dot menu next to New note and Upload.")
![The menu with New folder and Bring files in](https://www.svanja.com/images/docs/import-export-and-git/import-3.webp "Choose Bring files in.")
![Bring files in with Where from set to A zip file, then A folder, A Git repository and Cloud files](https://www.svanja.com/images/docs/import-export-and-git/import-4.webp "Under Where from, choose the source, here A zip file.")
![The field Put the files in this folder with the folder name imported](https://www.svanja.com/images/docs/import-export-and-git/import-5.webp "Optional: choose a folder under Put the files in this folder.")
![The Choose zip file button, with A Git bundle file next to it](https://www.svanja.com/images/docs/import-export-and-git/import-6.webp "Choose Choose zip file and pick the zip.")
![The check Ready to bring in: 3 notes into the folder imported, one item skipped as editor settings, with the list of files](https://www.svanja.com/images/docs/import-export-and-git/import-7.webp "Check what comes in. Skipped items are listed with the reason.")
![The message Brought in 3 items, You find them in imported, and the new folder imported in the folder list](https://www.svanja.com/images/docs/import-export-and-git/import-8.webp "Choose Import. Svanja says which folder the files are in.")

Here are the sources you can import from:

| Source                | For example                                                              |
| --------------------- | ------------------------------------------------------------------------ |
| **A zip file**        | An exported Obsidian vault, or a folder you zipped                       |
| **A folder**          | A folder from your computer, with its subfolders                         |
| **A Git repository**  | An HTTPS address from GitHub or GitLab                                   |
| **A Git bundle file** | A whole Git repository in one file. The link is below the other sources. |

An import can be up to 100 MB. For a private Git repository, open **More options** and add an **Access token**. You can also pick a **Branch or tag** there. Svanja uses the token for this import only and doesn't store it.

## What does the check show?

The check counts what it found: notes, files, skills, tools, rules, and templates. Rules come in as drafts, so none of them run until you turn them on in [Rules](https://app.svanja.com/rules).

Files that are already in the Space are listed under **Already in the Space**. For each one, choose **Skip**, **Keep both**, or **Replace**. The check also flags links that point to something the import doesn't include.

Some files are left out on purpose, and the check explains why:

- files that look like a secret, like a `.env` file with passwords
- editor settings, like Obsidian's own folder
- Git internals and system files
- files that are too large

When the import finishes, Svanja tells you which folder the files are in. Any skills it brought in are ready in Skills. If a tool needs details from you, the message links straight to it.

## Export one Space

1. Open the Space from [Spaces](https://app.svanja.com/spaces).
2. Choose **More**.
3. Choose **Export this Space**.
4. Choose **Current files** or **Files with their history**.
5. Choose **Prepare export**.
6. Choose **Download** when the zip is ready.

![The Studio website Space with the More button at the top right](https://www.svanja.com/images/docs/import-export-and-git/export-1.webp "Open the Space you want to export.")
![The More button of the Space with its menu open](https://www.svanja.com/images/docs/import-export-and-git/export-2.webp "Choose More.")
![The More menu with Export this Space, Archive and Move to Trash](https://www.svanja.com/images/docs/import-export-and-git/export-3.webp "Choose Export this Space.")
![The dialog Export Studio website with the choice Current files or Files with their history](https://www.svanja.com/images/docs/import-export-and-git/export-4.webp "Choose Current files or Files with their history.")
![The Prepare export button in the export dialog](https://www.svanja.com/images/docs/import-export-and-git/export-5.webp "Choose Prepare export. You can close the window while Svanja prepares the zip.")
![The export dialog saying Ready, 8 files in the zip, available until Dec 2, with a Download button](https://www.svanja.com/images/docs/import-export-and-git/export-6.webp "Choose Download. The zip stays available for 7 days.")

**Current files** includes every note and file as it is now. **Files with their history** also includes every earlier version, ready to open with Git. You can close the window while Svanja prepares the zip, and the download stays available for 7 days. If the history can't be included safely, the export lets you know and includes the current files only.

## Export everything

Export everything creates one archive of what you can open in the current team. Use it as a backup or to move your data elsewhere.

1. Open [Data and Trash](https://app.svanja.com/settings/data) in Settings.
2. Under **Export everything**, choose **Export**.
3. Choose **Download** when the archive is ready.

The archive holds the current version of each file, without the history. The download stays available for 7 days.

| In the archive | What it holds                                                            |
| -------------- | ------------------------------------------------------------------------ |
| `spaces/`      | One folder per Space you can open in this team, plus your Personal Space |
| `crm/`         | Your contacts and companies, as JSON and CSV                             |
| `tasks/`       | Your tasks, as JSON and CSV                                              |
| `rules/`       | The rules you can see                                                    |
| `artifacts/`   | The documents the assistant made                                         |

Your email isn't in the archive because it stays with your mail provider. You can bring a Space's folder from the archive back into a Space with **Bring files in**. For more on what Svanja keeps, see [Your data and privacy](https://www.svanja.com/docs/your-data-and-privacy/).

![Settings, Data and Trash, with the Export everything card and the Trash list](https://www.svanja.com/images/docs/import-export-and-git/data-and-trash.webp "Export everything makes one archive with your Spaces, contacts, tasks and rules.")

## Work on a Space with Git

With Git, you can open a Space in a code editor like VS Code, in Obsidian, or with a coding agent, and send your edits back. You need an access token, which acts as your password.

1. Open the Space from [Spaces](https://app.svanja.com/spaces).
2. Choose **Settings**.
3. Under **Work with Git**, copy the **Clone address**.
4. Type a **Name for a new token**, for example "Laptop".
5. Tick **Allow sending changes with Git** if you want to push changes back. This isn't available on the Free plan.
6. Choose **Create token**.
7. Copy the token. It's shown only once.

![The Studio website Space open on the Files tab](https://www.svanja.com/images/docs/import-export-and-git/git-1.webp "Open the Space.")
![The Settings tab of the Space with name, description and language](https://www.svanja.com/images/docs/import-export-and-git/git-2.webp "Choose Settings. Work with Git is further down the tab.")
![Work with Git with the Clone address of the Space and a Copy button](https://www.svanja.com/images/docs/import-export-and-git/git-3.webp "Under Work with Git, copy the clone address.")
![The field Name for a new token with Laptop typed in](https://www.svanja.com/images/docs/import-export-and-git/git-4.webp "Type a name for the new token, for example Laptop.")
![The line Your plan allows read-only tokens for this Space, shown on the Free plan instead of Allow sending changes with Git](https://www.svanja.com/images/docs/import-export-and-git/git-5.webp "Allow sending changes with Git appears on Pro and Team. On the Free plan, tokens are read-only.")
![The Create token button under the token name](https://www.svanja.com/images/docs/import-export-and-git/git-6.webp "Choose Create token. Copy the token right away: it's shown only once.")

Then clone the Space to your computer:

```
git clone https://app.svanja.com/git/spaces/<space-address>.git
```

When Git asks for a password, paste the token. Any username works.

Changes you push don't go straight into the Space. They wait under **Changes sent with Git** on the Space's **Settings** tab until someone with permission to edit the Space chooses **Add to the Space** or **Reject**. That way, a push can't overwrite what a colleague or the assistant wrote in the meantime. If the changes overlap with newer edits, you review the conflicts first.

On the Free plan, tokens are read-only, which is enough to clone the Space. Choosing **Revoke** next to a token stops it right away, though copies you already cloned stay where they are.
