
Google open-sources Copybara for repository migration
Google has released Copybara under an Apache 2.0 license, giving teams a ready‑made tool to move code between Git, Mercurial and Perforce repositories and keep them in sync.
Google has open‑sourced Copybara, an Apache 2.0‑licensed tool that moves code between repositories and keeps them synchronized [GitHub]. The project originated inside Google, where it powers internal monorepo migrations, and is now available for any team that needs to migrate or sync code.
── What shipped ──
Copybara supports Git, Mercurial and Perforce out of the box and can rewrite import statements, adjust package paths, and apply arbitrary transformations defined in a simple Starlark DSL. It integrates with Bazel for build‑aware migrations and can run as a bidirectional sync, pushing changes from a source repo to a destination and pulling updates back. The tool is highly configurable: users supply a copy.bara.sky file that defines the workflow, and Copybara handles branch management, conflict resolution and automated code formatting [GitHub].
── Why it matters ──
Repository migrations are a frequent source of friction—manual scripts often break, histories get lost, and teams spend weeks polishing edge cases. Copybara eliminates that churn by providing a single, battle‑tested solution that preserves commit metadata and enforces consistent transformations. Early adopters on Hacker News praised its practicality, noting that it “takes the guesswork out of cross‑repo syncs” and that the open‑source release invites community contributions to extend its capabilities [Hacker News]. By exposing Google’s internal migration workflow, the company lowers the barrier for smaller teams to adopt best‑practice tooling without reinventing the wheel.
Subscribe to the broadcast.
Daily digest of the day's most important tech news. No fluff. Engineering signal only.
// delivered via substack · double-opt-in confirmation


