From 59bc104d2366ae1ba6ee9cdd525be6672516611c Mon Sep 17 00:00:00 2001 From: Emmanuel Barat Date: Fri, 3 Nov 2023 11:59:08 +0100 Subject: [PATCH] Update README.md (#7) --- README.md | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 517047f..4e9bbe2 100755 --- a/README.md +++ b/README.md @@ -1,12 +1,31 @@ # Template Sync -A script to easily update a template based project -## Presentation +You started a project from a template repository but the template changed since you started the project? +Template Sync will import the changes made to the template to your project in a blink! + +## Getting Started + +```console +curl -sSL https://raw.githubusercontent.com/mano-lis/template-sync/main/template-sync.sh | sh -s -- +``` +If you have some conflicts resolve them and run `git cherry-pick --continue`. + +## Supported Templates + +* [GitHub Templates](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template) +* [GitLab Templates](https://docs.gitlab.com/ee/user/project/pages/getting_started/pages_new_project_template.html) +* [Symfony Docker](https://github.com/dunglas/symfony-docker) +* [API Platform Distribution](https://github.com/api-platform/api-platform) +* [Next.js starters](https://vercel.com/templates/next.js) (templates in monorepo are not working yet, PR welcome!) + +## How it works + This script identifies a commit in the template history which is the closest one to your project. Then it squashes all the updates into a commit which will be cherry-picked on the top of your working branch. Therefore you just have to resolve conflicts and work is done! -## Basic Usage +### Advanced + 1. Go to your project repository (we recommend to create a new branch) Copy template-sync.sh at the root of your project @@ -19,9 +38,7 @@ E.g. `./template-sync.sh https://github.com/dunglas/symfony-docker --threshold=3 4. You can run the script in debug mode by adding the `--debug` flag. -5. When conflicts are resolved, don't forget to run `git cherry-pick --continue` -If for any reason you are not satisfied with the result of the script you just have to run `git cherry-pick --abort` -to rollback before the execution of the script. +5. If for any reason you are not satisfied with the result of the script you just have to run `git cherry-pick --abort` to rollback before the execution of the script. *Created by [Emmanuel Barat](https://github.com/mano-lis) and [Raphael Marchese](https://github.com/Raphael-Marchese)*