@radiant-raise/git-template-sync
v2.0.2
Published
CLI tool to sync updates from a GitHub template repository via PR workflow
Maintainers
Readme
@radiant-raise/git-template-sync
CLI tool to sync updates from a GitHub template repository into your project via a clean PR workflow.
What it does
- Checks if an
upstreamgit remote is configured - Prompts for the template URL and main branch name if not set
- Creates a timestamped branch
chore/sync-template-updates-<timestamp> - Fetches & merges the latest template changes
- Pushes the branch and provides a ready-to-click PR creation URL
Install
# Global install
npm install -g @radiant-raise/git-template-sync
# Or run directly with npx
npx @radiant-raise/git-template-syncUsage
Run from inside any git repository that was created from a GitHub template:
git-template-syncFirst run (no upstream configured)
🔄 Git Template Sync
⚠ No upstream remote configured.
? Enter the template repository URL: https://github.com/org/template-repo.git
? What is the main branch of this repository? main
? What is the main branch of the template (upstream)? main
✔ Upstream remote added (push disabled for safety)
✔ Local main is up to date
✔ Fetched upstream changes
✔ Created branch: chore/sync-template-updates-20260217143022
✔ Merged upstream changes successfully
✔ Branch pushed to origin
✅ Template sync complete!
Create your Pull Request:
https://github.com/your-org/your-repo/compare/main...chore/sync-template-updates-20260217143022?expand=1&title=...Subsequent runs (upstream already configured)
🔄 Git Template Sync
✔ Upstream remote found: https://github.com/org/template-repo.git
? Use this upstream configuration? Yes
? What is the main branch of this repository? main
? What is the main branch of the template (upstream)? main
✔ Local main is up to date
✔ Fetched upstream changes
✔ Created branch: chore/sync-template-updates-20260218091500
...No changes to sync
🔄 Git Template Sync
✔ Upstream remote found: https://github.com/org/template-repo.git
? Use this upstream configuration? Yes
? What is the main branch of this repository? main
? What is the main branch of the template (upstream)? main
✔ Local main is up to date
✔ Fetched upstream changes
✅ Already up to date — no changes from the template to sync.Merge conflicts
If the merge results in conflicts, the tool will pause and give you instructions:
⚠ There are merge conflicts that need to be resolved.
Resolve the conflicts, then run:
git add .
git commit -m "chore: sync updates from template repository"
git push origin chore/sync-template-updates-20260217143022
Then create your PR:
https://github.com/...Requirements
- Node.js >= 18
- Git installed and available on PATH
- Repository hosted on GitHub (for PR URL generation)
License
MIT
