-
Notifications
You must be signed in to change notification settings - Fork 0
Subtree
Eric Bouchut edited this page Apr 11, 2021
·
16 revisions
Assuming we have a monorepo, ie. a single git repository, containing both the back-end (server) and front-end (client) code.
You want to extract the client code in another branch named for instance client
.
The below command splits the
client/
folder in aclient
branch. That is theclient
branch will only contain the commits related to theclient/
folder.
cd monorepo
git checkout master
git subtree split --prefix=client -b client
The next will be to push this branch to another repository.