Skip to content

Applying to Existing Projects

To apply this template to an existing project, follow these steps:

  1. Review the prerequisites from Getting Started and decide which method you are using
  2. Ensure your project is already using Git, and the all of the following are true:
  3. Project is cloned to your local computer
  4. All changes are committed
  5. Default branch (usually main or master) is checked out
  6. Create a new branch (copier-template-apply, for example) from your default branch
  7. Make sure your shell is in the project root, then run the appropriate command below based on the method you are using for prerequisites:

    Docker

    docker run -v .:/mnt/${PWD##*/} -w /mnt/${PWD##*/} -v ~/.gitconfig:/root/.gitconfig:ro -it --pull always --rm ghcr.io/natescherer/postmodern-tools-container:latest copier copy --trust --overwrite gh:natescherer/pm-repo-int .
    

    Devcontainer/Manual

    copier copy --trust --overwrite gh:natescherer/pm-repo-int .
    
  8. If you are using GitHub, Make sure to choose Set Repo Rules in the first question

  9. Set all other settings as appropriate for your project
  10. Once the template is applied, review files that have been changed using git, and stage, discard, or modify as appropriate
  11. Commit and push the changes, then merge them via a Pull Request
  12. You are done, and your project will now operate the same as one that was generated from this template.