Simple Node system to manage multiple Repositories into the same repo
dist/andbin/are built one file per module — the two bundles are replaced by one minified file per source module, andbin/gitmulti.mjsis now a short launcher that imports the library fromdist/instead of carrying its own copy. Thegitmulticommand and theimport/require()API are unchanged, and no runtime code changed (#88).- View full v0.1.2 Changelog
- v0.1.1 (November 2026) — Apache-2.0 license, the first published release with the v0.1.0 CLI (the release pipeline fix), and a pre-commit hook (Changelog)
- v0.1.0 (November 2026) — rebuilt as ESM on commander 15 with a working
gitmulti listCLI and animport/require()API; needs Node.js 22.12.0 or newer. Never published: it ships with v0.1.1 (Changelog) - v0.0.12 (October 2026) —
@cldmv/fix-headers2.2.0 and@cldmv/configs1.2.4 (dev dependencies only); no header or runtime change (Changelog) - v0.0.11 (October 2026) — CI only: the in-repo PR mirror job now always runs and reports under a non-required name instead of being skipped (Changelog)
📚 For complete version history and detailed release notes, see the docs/changelog/ folder.
gitmulti is installed from GitHub; it isn't published to npm.
npm install --global github:CLDMV/gitmulti
gitmulti list [dir]gitmulti list [dir] prints the path of every .gitmulti file under dir (the current directory by default), relative to it, one per line. It searches every folder except node_modules and .git and doesn't follow symbolic links. list is the default command, so gitmulti and gitmulti some/dir do the same. gitmulti --version prints the version and gitmulti --help lists the commands.
The same functions are available from code, with import or require():
import { findGitmultiFiles, run } from "gitmulti";
findGitmultiFiles("."); // absolute paths of every .gitmulti file, sorted
run(["node", "gitmulti", "list", "."]); // what the gitmulti executable does- Node.js 22.12.0 or newer, the floor of
commander15.require()needs Node.js 22.13.0 or newer (require(esm)); on older versions the CommonJS entry throwsERR_REQUIRE_ESMand points toimport(). - Developing gitmulti needs Node.js 22.22.0 or newer (
devEngines). In a checkout, thegitmulti-devexport condition loadssrc/instead of the build indist/:export NODE_OPTIONS=--conditions=gitmulti-dev. The tests use it automatically;npm run buildbuildsdist/andbin/.npm testruns the suite againstsrc/, thennpm run test:cjschecks the CommonJS entry on the build andnpm run test:distruns the suite again againstdist/.
I have a habit of creating tools which are already available but are not simple. I've done research on this issue multiple times and maybe I just didn't find the solution that is already out there. But basically I want to edit a folder of code and have a program update the individual repos which that code belongs to. My first attempt required listing all the files which belonged to each repo. This was alright but required me to either spend hours making this list or write some gui for it. The GUI never happened and months later I abandonned the idea.
Recently I started Forking one of my projects over and using it's base code to create some new code. After a while I got thinking "this is going to be hell when I want to put these improvements back into the base code I forked". So over a year later is there a tool to do what I "need" (want really)? Didn't find one. So taking some look at already present git tools I decided to write a node (for portability) tool which will scan for .gitmulti files.
This tool will scan a repo for .gitmulti files. These files will be in json format (makes it easy for node to read, and frankly looks better than ini file format). From these files the tool will assign based on the git URL and paths specified what repo the files under it belong to.
From there the tool will do it's magic of moving files around, issueing the git commit, push, pull requests for each individual repo that is part of a multi-repo.
It's a simple tool. It will only commit, push, and pull. Anything else from the git toolset will be left out (for now at least).
This project exists thanks to all the people who contribute. [Contributors].
Apache-2.0 © Shinrai / CLDMV. See LICENSE.