Below are the commands for Linux (Same for MacOS). You can save this as a shell script (.sh
file):
#!/bin/bash
# Cloning the repository with sparse checkout
git clone --filter=blob:none --sparse https://github.com/skills-cogrammar/C12-Lecture-Backpack.git
# Changing directory to the cloned repository
cd C12-Lecture-Backpack
# Adding the specific folders to sparse checkout
git sparse-checkout add "Software Engineering (SE)"
git sparse-checkout add "StarterPack"
- Copy the above code into a text editor.
- Save the file with a
.sh
extension, for example,clone_sparse_checkout.sh
. - Open a terminal and navigate to the directory where the script is saved.
- Make the script executable by running:
chmod +x clone_sparse_checkout.sh
- Run the script by executing:
./clone_sparse_checkout.sh
This script will clone the repository with a sparse checkout and include both the Software Engineering (SE)
and StarterPack
directories.