Page 1 of 1

Cloning Project Using Git

Posted: Fri Apr 30, 2021 1:46 am
by jussij
When cloning a project from GitHub the following command is used:

Code: Select all

git clone <Project URL>
The issue with this command is it will only clone the files belonging to the project and not the code found in other projects dependencies.
To also clone the code for these projects dependencies the following additional commands need to be run:

Code: Select all

cd <The project folder created by the clone command>
git submodule init
git submodule update
Alternatively all these commands can be run using this all in one shortcut command:

Code: Select all

git clone <Project URL> --recursive
When these commands are run the local working copy will contain all the code for the project and it's dependencies.