I\'m very new to Git. I\'ve been searching for an answer, but I couldn\'t find one.
In my computer I have a project folder like this:
project_a
--some_fo
Assume that I would like to add FreeRTOS
repository, which URL is https://github.com/FreeRTOS/FreeRTOS-Kernel.git
, into my repository, example URL is https://github.com/username/example
as a submodule
git submodule add https://github.com/FreeRTOS/FreeRTOS-Kernel.git
git add .
git commit -m 'add a submodule'
git push
To clone using HTTPS:
git clone https://github.com/username/example.git --recurse-submodules
Using SSH:
git clone git@github.com:username/example.git --recurse-submodules
If you have downloaded the repo without using the --recurse-submodules
argument, you need to run:
git submodule update --init --recursive