greencape/monorepo

This tool is a partial replacement for git commands that utilizes `git-subtree` to manage monorepos.

1.0.1 2022-08-05 13:46 UTC

This package is auto-updated.

Last update: 2024-12-05 19:07:13 UTC


README

This tool is a partial replacement for git commands that utilizes git-subtree to manage monorepos.

Installation

Commands

mono init

Initialize a fresh project. A local git repository is created with an empty initial commit. You do not need to initialize projects that already are under git and have a clean working tree.

Synopsis

$ mono init

mono add

Add (create, import) a subproject named <name> for the repository at <url> stored in <directory>.

Synopsis

$ mono add [--name=<name>] <directory> <url>

mono split

Turn the content of <directory> into a subproject named <name> with its own repository at <url>.

Synopsis

$ mono split --dir=<directory> <name> <url>

mono rename

Rename the subproject named <old> to <new>. All configuration settings for the subproject are updated.

Synopsis

$ mono rename <old> <new>

mono merge

Integrate the subproject named <name> into the main project. All configuration settings for the subproject are removed.

Synopsis

$ mono merge <name>

mono remove

Remove the subproject named <name>. All configuration settings for the subproject are removed.

Synopsis

$ mono remove <name>

mono pull

Fetch and merge recent changes up to <commit> into the <name> subproject. This does not remove your own local changes; it just merges those changes into the latest <commit>. With --squash, creates only one commit that contains all the changes, rather than merging in the entire history.

If you use --squash, the merge direction does not always have to be forward; you can use this command to go back in time from v2.5 to v2.4, for example. If your merge introduces a conflict, you can resolve it in the usual ways.

Synopsis

$ mono pull [--squash|--no-squash] <name> [<commit>]

mono push

Push the subproject named <name> to the configured repository and <ref>. This can be used to push your subproject to different branches of the remote repository.

Synopsis

$ mono push <name> [<ref>]

Also see