This project includes submodules that are essential for its functionality. Please follow the guide below to clone or pull this repository correctly.
When cloning a repository that contains submodules, you must ensure that both the main repository and its submodules are initialized and updated.
To clone the repository and automatically initialize and update its submodules, use the --recurse-submodules
flag:
git clone --recurse-submodules https://github.com/username/project.git
After cloning, navigate into the project directory:
cd project
If you have cloned the repository without the --recurse-submodules
flag, you can manually initialize and update the submodules using the following commands:
git submodule init
git submodule update
Or you can do both steps in one command:
git submodule update --init --recursive
When pulling updates from a repository with submodules, you need to ensure the submodules are also updated.
First, pull the latest changes from the main repository:
git pull
After pulling, update the submodules to ensure they are synced with the main repository:
git submodule update --recursive
Alternatively, you can use this command to pull and update submodules in one step:
git pull --recurse-submodules
-
Add a new submodule:
git submodule add <repository-url> <path-to-submodule>
-
Remove a submodule:
- Remove the submodule from the
.gitmodules
file:git rm --cached <path-to-submodule>
- Commit the changes and delete the submodule folder:
rm -rf <path-to-submodule>
- Remove the submodule from the
For more details on working with submodules, refer to the official Git documentation on submodules.