---
title: "Updating Vuesion"
description: "Merge new Vuesion releases into your product with an upstream branch."
canonical_url: "https://www.vuesion.dev/docs/development/updating"
---

> Index of every page on this site: [llms.txt](https://www.vuesion.dev/llms.txt)

# Updating Vuesion

Every Vuesion release is a complete archive, `vuesion-<version>.tar.gz` or `vuesion-<version>.zip`, without Git history. To take over a new release without losing your own changes, keep the unchanged releases on a separate branch and let Git merge them into your product.

```text
vuesion   1.7.0 ──────────── 1.8.0
            │                  │
            ▼                  ▼
main        ●── your work ──── ● merge
```

- `vuesion` contains only unchanged Vuesion releases, one commit per release.
- `main` is your product. It never receives commits on `vuesion` other than through merges.

Because both branches share the release you started from, Git only has to merge what changed between two releases.

## Start a new project

Commit the unchanged release before changing anything:

```bash
tar -xzf vuesion-1.7.0.tar.gz
cd vuesion-1.7.0
git init -b vuesion
git add -A
git commit -m "chore: vuesion 1.7.0"
git switch -c main
```

Then continue with [Installation](https://www.vuesion.dev/docs/getting-started/installation#configure-the-environment) and develop on `main`.

## Add the branch to an existing project

If your repository starts with changed or unrelated code, create the `vuesion` branch from the release your project is on and record it as merged, without changing your files:

```bash
git switch --orphan vuesion
tar -xzf ../vuesion-1.7.0.tar.gz --strip-components=1
git add -A
git commit -m "chore: vuesion 1.7.0"
git switch main
git merge -s ours --allow-unrelated-histories vuesion -m "chore: track vuesion 1.7.0"
```

Run these commands without uncommitted changes. `git switch --orphan` empties the working tree except for ignored files.

## Merge a new release

1. Read the **RELEASE_NOTES.md** of every version between your current and the target version.
2. Replace the content of `vuesion` with the new release. Removing the tracked files first makes sure that files deleted in the release are deleted on the branch:```bash
git switch vuesion
git rm -rq .
tar -xzf ../vuesion-1.8.0.tar.gz --strip-components=1
git add -A
git commit -m "chore: vuesion 1.8.0"
```

<br />

Ignored files, such as `.env` and `node_modules`, stay untouched.
3. Merge the branch into an update branch of your product. `--no-commit` stops before the merge commit, also when there are no conflicts:```bash
git switch main
git switch -c update-vuesion-1.8.0
git merge --no-commit vuesion
```
4. Restore your migrations. Every release contains only its updated `init` migration, and Git takes it over without a conflict when you never changed it. An applied migration must never change:```bash
git restore --source=HEAD --staged --worktree prisma/migrations
```
5. Resolve the conflicts:
  - For files you deleted, for example after a [removal guide](/docs/removal/shared-removal-loop), keep them deleted with `git rm <file>`.
  - Merge `package.json` by hand, then take over the lockfile of the release and add your own dependencies again with `npm install`:```bash
  git checkout --theirs package-lock.json
  npm install
  ```
6. Complete the merge with `git commit`.
7. Create the migration for the schema changes and apply the remaining upgrade steps, as described in [Updating Vuesion](https://www.vuesion.dev/docs/development/database#updating-vuesion).
8. Run `npm run lint` and `npm test`, then merge the update branch into `main`.

Keep `vuesion` free of your own changes. A fix you need before the next release belongs on `main`; the next merge reconciles it with the release.

## Next steps

Continue with **Why Vuesion Exists** to learn the ideas and principles that shaped the architecture of Vuesion.

## Sitemap

See the full [sitemap](https://www.vuesion.dev/sitemap.md) for all pages.
