Clone a Specific Folder from a Git Repository
You can use sparse checkout in Git to download only a specific folder from a repository. Here's how:
Steps
-
Create a Folder and Navigate to It:
mkdir <folder-name>
cd <folder-name> -
Initialize Git:
git init
-
Add the Repository URL:
git remote add origin <repo-url>
-
Enable Sparse Checkout:
git sparse-checkout init
-
Select the Folder to Clone:
git sparse-checkout set <folder-path>