Get support for coopTilleuls/template-sync
If you're new to LTH, please see our FAQ for more information on what it is we do.
Support Options
Unfortunately, there are currently no active helpers for this repository on the platform. Until they become available, we reccomend the following actions:
View Open IssuesTake a look to see if anyone else has experienced the same issue as you and if they managed to solve it.
Open an IssueMake sure to read any relevant guidelines for opening issues on this repo before posting a new issue.
Sponsor directlyCheck out the page and see if there are any options to sponsor this project or it's developers directly.
coopTilleuls/template-sync
Template Sync
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
curl -sSL https://raw.githubusercontent.com/coopTilleuls/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
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!
Monorepo containing multiple templates
Using this kind of templates, you have to specify the subdirectory where your template is with
the --directory
flag.
For example, assume you work on a project base on the template "api-routes" from next starters. The main monorepo is vercel/next.js and the template is located in examples/api-routes :
curl -sSL https://raw.githubusercontent.com/coopTilleuls/template-sync/main/template-sync.sh | sh -s -- https://github.com/vercel/next.js --directory=examples/api-routes
Advanced
-
Go to your project repository (we recommend to create a new branch) Copy template-sync.sh at the root of your project
-
The only mandatory argument is the GitHub or GitLab URL of your template but if you want to synchronize your project with a specific version of the template, you can specify the commit you are targeting by adding
--commit=<commit SHA>
. E.g. Assume your project is based on dunglas/symfony-docker and you just want to get the improvements of the new php app server FrankenPHP. Run this command :
curl -sSL https://raw.githubusercontent.com/coopTilleuls/template-sync/main/template-sync.sh | sh -s -- https://github.com/dunglas/symfony-docker --commit=88f5c19
- In case some files are renamed or moved in the template history, you can modify the threshold where git considers two files as identical. Default value for this script is 20% (git's default value is 50%). If git is confused and considers files that are not identical to be identical, you can raise this threshold. E.g:
curl -sSL https://raw.githubusercontent.com/coopTilleuls/template-sync/main/template-sync.sh | sh -s -- <url-of-the-template> --threshold=30
-
You can run the script in debug mode by adding the
--debug
flag. -
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 and Raphael Marchese
Our Mission
We want to make open source more sustainable. The entire platform was born from this and everything we do is in aid of this.
From the Blog
Interesting Articles
-
Generating income from open source
Jun 23 • 8 min read
-
2023 State of OSS
Apr 23 • 45 min read ★
-
A funding experiment...
Aug 19 • 10 min read
-
But You Said I could
Aug 19 • 2 min read
Thank you for checking out LiveTechHelper |
2025 © lth-dev incorporated
p-e622a1a2