Skip to content

A bash 4 script that creates a mono-repo from multiple repositories

License

Notifications You must be signed in to change notification settings

amitassaraf/monoify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Monify

A bash 4.0+ script that creates a mono-repo from multiple repositories.

Creates a new repository named uni[my_repo_name_here] and in it are all the requested repositories with their git commit history included (and prefixed with the repo names).

the unirepo history will look like so:

[API-MODULE] Added new route for login
[WEB-MODULE] Removed logo from left panel
[API-MODULE] New SSL enrcyption of traffic
[MOBILE-MODULE] Added index.ios.js for iOS

Example usage:

monify create [new_repo_name] [repos_seperated_by_spaces] [git_project_url]

monify create repo "api-module web-module mobile-module" git@bitbucket.org:project

This will create a mono repo like so

megarepo (Build folder generated)
--- api-module
--- web-module
--- mobile-module
--- unirepo (This is the mono-repo)
------ api-module
------ web-module
------ mobile-module

after it is created just cd into the unirepo add a remote and push it to your desired git server.

Mono-Repo vs Multi-Repo

If you are wondering why this exists then you should read some of the following posts to see the benefits of a mono-repo and what it is.

Requirements

  • bash 4.0 and above
  • If on OSX then gsed is required

Notes

This script was tested on OSX only but should work just fine with any Linux box.

About

A bash 4 script that creates a mono-repo from multiple repositories

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages