Git subrepo simple workflow
Git subrepo is a better* way to handle GIT submodules.
*other people recommended it, after struggling a lot with GIT submodules
You have two repos: source_repo
and mono_repo
.
Clone source_repo
into mono_repo
:
cd mono_repo
git subrepo clone `source_repo`
Update mono_repo
with new changes
# still in `mono_repo`
git subrepo pull `source_repo`
Update source_repo
with changes made in mono_repo
# still in `mono_repo`
git add .
git commint -m "made changes including stuff in `source_repo`
git push
# and push to `source_repo`
git subrepo push source_repo
cd source_repo
git pull
This will commit your changes that you did in mono_repo
and push it to the source_repo
Again, the command is
git subrepo push source_repo