# Upgrade guide

See discussion in [Github issue](https://github.com/petalframework/petal_pro/issues/14).

Version updates can be a bit of a manual process. A boilerplate is meant to be a starting point for you to build from - rather than a framework like Phoenix. However, it is possible.

### Options

#### Copy your files into a fresh project

If you haven't changed too many existing files and added mostly new ones, you could start a fresh project with the latest Petal Pro and migrate over the work you've done from the previous project. This is likely the easiest route. If you want to keep your git history, then you could try copying the `.git` folder from the previous project into the new one.

#### Attempt a git merge

```
git remote add petal_pro git@github.com:petalframework/petal_pro.git
git fetch petal_pro
git merge petal_pro/main --allow-unrelated-histories
```

Comment from a Pro user:

* Use rename\_phoenix\_project.sh to rename back to PetalPro
* rsync -r --delete --exclude=.git \~/code/petal\_pro-1.3.0/ \~/code/your-app
* git checkout HEAD path/to/files/rsync/deleted/but/shouldnt/have (I used --delete with rsync so I'd know about files that were removed, for example, I think some of the org stuff was moved, and I don't want cruft)
* git add -p
* Use rename\_phoenix\_project.sh to rename back to your app name

#### Git diffing

Comment from a Pro user:&#x20;

The easiest way for me is to create a fresh project from the updated petal\_pro, rename it to the same name as your existing project, and then run a diff tool like Araxis merge against the root directories. As long as you have mostly added your own files and not modified the template files much it doesn't take too long. You can either merge the template changes into your existing project (better for git history) or merge your customizations into the fresh project.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.petal.build/petal-pro-documentation/v1.5.0/upgrade-guide.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
