Skip to content

Commit

Permalink
Update README.md (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
mano-lis authored Nov 3, 2023
1 parent f746e32 commit 59bc104
Showing 1 changed file with 23 additions and 6 deletions.
29 changes: 23 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -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 -- <url-of-the-template>
```
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

Expand All @@ -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)*

0 comments on commit 59bc104

Please sign in to comment.