- Clone the repository
- Create a
.env
file based on.env.template
- Run the command to rebuild the submodules:
git submodule update --init --recursive
- Run the command:
docker compose up --build
- Create a new repository on GitHub
- Clone the repository to your local machine
- Add the submodule, where
repository_url
is the URL of the repository anddirectory_name
is the name of the folder where you want to store the submodule (it must not exist in the project)git submodule add <repository_url> <directory_name>
- Add the changes to the repository (
git add
,git commit
,git push
)
Example:git add . git commit -m "Add submodule" git push
- Initialize and update submodules. When someone clones the repository for the first time, they must run the following command to initialize and update the submodules:
git submodule update --init --recursive
- To update submodule references:
git submodule update --remote
When working with a repository that contains submodules, first update and push the submodule and then push to the main repository.
If done in reverse order, submodule references in the main repository will be lost, leading to potential conflicts that must be resolved.