Cloning Project Using Git
Posted: Fri Apr 30, 2021 1:46 am
When cloning a project from GitHub the following command is used:
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:
Alternatively all these commands can be run using this all in one shortcut command:
When these commands are run the local working copy will contain all the code for the project and it's dependencies.
To clone a specific release, add the tag name to the command line:
Code: Select all
git clone <Project URL>
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
Code: Select all
git clone <Project URL> --recursive
To clone a specific release, add the tag name to the command line:
Code: Select all
git clone <Project URL> --recursive --branch <tag_name>