Skip to content

Latest commit

 

History

History
60 lines (37 loc) · 1.41 KB

File metadata and controls

60 lines (37 loc) · 1.41 KB

Notes

working with submodules

https://git-scm.com/book/en/v2/Git-Tools-Submodules

clone and initialize submodules

git submodule init initializes your local configuration file, and git submodule update fetches all the data from that project and checks out the appropriate commit listed in your superproject

git clone git@github.com:hyperboliclabs/jungle.proto.git
git submodule update --init --recursive

or, more simply:

git clone --recurse-submodules git@github.com:hyperboliclabs/jungle.proto.git

get submodule updates from upstream protos repo

If you want to check for new work in a submodule, you can go into the directory and run git fetch and git merge the upstream branch to update the local code.

cd epitome/jungle
git checkout main
git pull --rebase

alternatively, to do this for all submodules:

git submodule update --remote

This command will by default assume that you want to update the checkout to the default branch of the remote submodule repository (the one pointed to by HEAD on the remote)

set git pull to always recurse submodules

git config --global submodule.recurse true

move submodule to new path

git mv jungle epitome/jungle

add a new submodule

git submodule add git@github.com:hyperboliclabs/jungle.proto.git