Output looks like below:
We are grouping multiple git repository under single git repository using SubModules concept.
Each submodule is a git repository.
Steps:
Step 1: Create each git repository in GIT
- galleyiq-frontend-frontend
- galleyiq-scm-crm-scm-crm
- galleyiq-gms-customerportal-gms-customer
- galleyiq-lms-partner-lms-partner
git remote add origin https://github.com/BharathanBtech/galleyiq-meta.git git push -u origin main
If a new team member clones this meta repository needs to clone the repo and run the below command
git submodule update --init --recursive
Reason: if you clone, the repository will be empty.. After ran this command only git will pull
the latest code from the remote.
If the submodule commit is 10 and meta repo points to 7 means, running this command will get
7th commit code only not 10.
To get 10th commit, we have to pull the latest code on each submodule and add that to the meta repo.
git commit -m "Add submodules"
git commit -m "Add submodules"
git commit -m "Add submodules"