How to update to the latest template structure¶
Overview¶
To track changes to the upstream template, run
uvx copier update --trust
Note
One-time migration: if your project's recorded template version predates
the Jinja-extension removal, run the first update with
uvx --with copier-template-extensions copier update --trust — after
that single update, plain uvx copier update --trust works again.
This will fetch the latest tagged release of the template, and apply any changes to your working copy. It will prompt for answers again, giving your previous answers as the defaults.
It will stage all the changes for commit, but there may be merge conflicts that need fixing first, find them with
git diff --check
Once they are all fixed, make a commit.
Recommended Workflow¶
The following steps are recommended to update your project, especially for infrequently updated projects:
- first make sure all the tools are updated to latest versions
- for devcontainers
ctrl+shift+p->Remote-Containers: Rebuild Without Cache and Reopen in Container
- for local development
uv sync
- for devcontainers
- validate your project against the latest tools
task check
- fix issues found by the above
- commit the changes
- update the template
uvx copier update --trust
- fix any merge conflicts
- validate that the project still works
task check
- fix any issues found by the above
- commit the changes