Manage lerna with git subtree
A list of commands to help manage lerna sub-projects with git subtree.
Commands:
-
lerna-subtree add <GIT_REMOTE_URL>
- it runs command
git remote add subtree-<REPO_NAME> <GIT_REMOTE_URL>
if remote does not exist - it runs
git subtree add --prefix=packages/<REPO_NAME> subtree-<REPO_NAME> <branch>
- it runs command
-
lerna-subtree publish
- it runs
lerna publish
- it runs, for each sub-tree,
git subtree --prefix=packages/<REPO_NAME> push subtree-<REPO_NAME> --all
- it runs