Urgent.News

What's breaking now, across thousands of outlets.

Tech

The Monorepo Migration: Merging Histories Without Losing Your Mind

At FilmTailor we'd got to the point where every new service meant a new repo, a new pipeline, and a new set of "wait, which version of the shared library is this one on?" conversations. Nothing was broken exactly. It was just death by a thousand context switches: five terminals open, five READMEs slightly out of date, and PRs that touched three repos because one API contract changed. The fix was…

FilmTailer discovered that every new service required a new repository, pipeline, and versioning headaches when multiple services were involved. This led to context switching, outdated READMEs, and PRs touching multiple repositories due to changes in API contracts. The solution was to merge everything into a single monorepo. However, preserving the git history intact became crucial, as simply copying files would result in loss of blame annotations and version control history.

Git-filter-repo was chosen as the tool for rewriting history, replacing the older and slower filter-branch. The process involved creating a new monorepo, cloning the service repository, prefixing tags with a prefix to avoid tag collisions, and rewriting commits to match the desired author email. Finally, the service was moved into a subdirectory within the monorepo and integrated via a new branch.

This approach allows for shared code without the need for an internal NuGet feed, provides a clean path to orchestration tools like Aspire, and maintains a clear version history throughout the migration process.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

More from Saturday 29 August →