https://github.com/simonbaeumer/sync-monorepo
Sync a monolithic repository into standalone subtree repositories.
https://github.com/simonbaeumer/sync-monorepo
git monorepo splitsh subtree-split
Last synced: 7 months ago
JSON representation
Sync a monolithic repository into standalone subtree repositories.
- Host: GitHub
- URL: https://github.com/simonbaeumer/sync-monorepo
- Owner: SimonBaeumer
- Created: 2019-04-16T07:34:43.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-11-13T12:57:40.000Z (over 6 years ago)
- Last Synced: 2025-02-28T15:11:08.578Z (over 1 year ago)
- Topics: git, monorepo, splitsh, subtree-split
- Language: Shell
- Homepage:
- Size: 30.3 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://travis-ci.org/SimonBaeumer/sync-monorepo)
# Syncing monorepo into subtree repositories
Sync a monolithic repository into multiple standalone subtree repositories.
## Dependencies
- bash
- git
- [splitsh-lite](https://github.com/splitsh/lite)
## Usage
```bash
./sync.sh [branch] [origin] [path-to-repos]
```
## Example
`$ ./sync.sh master git@github.com:SimonBaeumer/sync-monorepo.git repos`
### Terminal
```bash
./sync.sh master git@github.com:SimonBaeumer repos/
```
**Note:** `git rev-parse --abbrev-ref HEAD` returns the current branch
### Travis
### Create ssh-keys
1. `ssh-keygen -t rsa -b 4096 -C "" -f github_deploy_key -N ''`
2. Add the `github_deploy_key.pub` with `write_access` as a deploy key to your synced repo
3. Add the `github_deploy_key` as an encrypted environment variable to your monorepo ([tutorial](https://github.com/alrra/travis-scripts/blob/master/docs/github-deploy-keys.md))
However, there is an "issue" with travis that you need a new deploy key for every repository you want to sync.
### GitLab
to be done