extract a monorepo subdir
Project description
This module (and related script) extracts the content of a subtree in a monorepo and it creates a stand alone repo (copying the related history).
Let say you have a monorepo with multiple projects (project1, project2 etc.) and we wan to make project1 a stand alone repo (retaining the project1 history):
monorepo/ ├── README.TXT ├── misc │ └── more └── subfolder ├── project1 # <-- we want to extract this │ └── a │ ├── hello.txt │ └── subtree ├── project2 └── project3
The command to to this is:
mono2repo init -v project1 monorepo/subfolder/project1
Installation
You can install mono2repo via pip from PyPI:
$ pip install mono2repo
The mono2repo.py is a standalone script and it can be just dowloaded:
curl -LO https://raw.githubusercontent.com/cav71/mono2repo/master/mono2repo.py
Example
For this example we first create the summary repo from the main pelican monorepo, then we update the summary with the new upstream changes:
https://github.com/getpelican/pelican-plugins.git .... └ summary/ ├── Readme.rst └── summary.py
Create a new repo
First we create a new repo:
mono2repo init summary-extracted \ https://github.com/getpelican/pelican-plugins.git/summary
Update the repo
Update the summary-extracted with the latest summary related changes:
mono2repo update summary-extracted
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for mono2repo-0.0.8b29-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3faab68579de337eaa024d18225ee99b02225b288e3feee82c1bad8cf82c2b51 |
|
MD5 | 27036f519a75a0cca115d154fad1ec15 |
|
BLAKE2b-256 | a582735bce101f654b80e669e80de9da4b21ca9f5d2ebd4e1f545b0a94ddacc0 |