Generates a single monolithic repository from a list of other git repositories
Why?
- Google Is 2B Lines of Code, All in One Place
- On Monolithic Repositories
- Advantages of Monolithic Version Control
How?
Installation
gem install monolith
Usage
Create a monolith.yml
file in your working directory with a list of repositories
path: /path/to/your/new/monolith
repositories:
admin: git@github.com:some-org/admin.git
auth: git@github.com:some-org/your-auth-gem.git
users: git@github.com:some-org/users.git
# Optional whitelist of branches to clone. By default,
# ALL branches are imported into the monolith.
branches:
- master
# Optional list of commands to run right after
# all of the repositories above have been cloned.
#
# These are handy for things like rewriting history
# to remove large unused files or sensitive information.
after_clone:
- ./remove_all_unused_large_files
# Optional list of commands to run after the monolith
# has been generated.
#
# These hooks are handy for things like introducing new top-level
# config files for services like Heroku, CodeClimate, CircleCI, etc.
after_generate:
- ./add_global_gitignore
- ./add_global_slugignore
Use the monolith
command to generate a repository at /path/to/your/new/monolith
monolith generate
See monolith help
for a list of other commands
Commands:
monolith clone # Clone configured repositories
monolith config # List all configured repositories
monolith generate # Generate a new monolith from configured repositories
monolith help [COMMAND] # Describe available commands or one specific command
Contributing
- Fork the project.
- Make your feature addition or bug fix.
- Add tests for it. This is important so I don't break it in a future version unintentionally.
- Commit, do not mess with the version or history.
- Send me a pull request. Bonus points for topic branches.
License
MIT - Copyright © 2015 Sean Huber