Google copybara: moving code between repositories(github.com)
243 points by reconnecting 13 hours ago | 45 comments
tl;dr: Copybara is a Google-internal tool, available on GitHub, for transforming and syncing code between repositories—commonly used to keep a confidential repo in sync with a public one, or to import external contributions back into an authoritative source. It's stateless (storing state as labels in destination commit messages), configured via Starlark-like files (copy.bara.sky), and currently supports Git with experimental Mercurial read support. Workflows define origin, destination, file globs, and transformations like path moves and string replacements.
HN Discussion:
  • Historical comparison noting similar tools existed decades ago in IBM systems
  • Tool is too slow in practice; simpler bash scripts with git-filter-repo work better
  • Asking whether Copybara fits use cases like sharing code between repos without libraries
  • Personal positive experience using it for simple one-way exports preserving history
  • Warning against adoption due to Google's history of abandoning tools; simpler alternatives exist