Migrating Old Projects¶
The copier tool allows us to easily transform an old repository, that has not
been created with the template, to one that is linked to a copier template.
This can be simply done by just copying the template onto an existing repository.
// Migrate an old repository to use the template
$ copier copy --trust "git+https://gitlab.tuwien.ac.at/cookbooks/templates/tu-cookbook-python" path/to/old/repo/
If a file from the template is not yet present in the repo copier will render
and add it.
If a file already exists copier asks the user, wheter or not the file should
be overwritten.
Note
It is recommended to always overwrite the files, as they might include content that is necessary to the repo.
With Git the user can anyway remove unwanted content easily after
closer inspection.