Now that you have Git and GitHub set up, it's time to clone the workshop repository to your local machine. This is where you’ll get all the files and folders you need to complete the exercises.
Command
Run the following commands in your terminal:
git clone --sparse <repo_url>
Once the repository is cloned, navigate into the repository folder:
cd <repo_folder>
Finally, check out only the specific folder you need:
git sparse-checkout set hosting-your-site/clone-this
Explanation
-
First command:
git clone --sparse
This clones the repository but skips downloading file contents until you specify what you want. Replace<repo_url>
<repo_url>
with the repository URL. -
Second command:
cd
This navigates into the folder that was created during the clone process.<repo_folder>
-
Third command:
git sparse-checkout set hosting-your-site/clone-this
This downloads only theclone-this
folder inside thehosting-your-site
directory, saving time and space.