How to clone only sub directory git

Code examples

1
0

git clone directory from repository

git clone [repo]
cd [name of sub-dir]
git filter-branch --prune-empty --subdirectory-filter [path to sub-dir] HEAD
1
0

how to clone only sub directory git

Cloning only a subdirectory is not possible in Git. 
The network protocol doesn't support it, 
the storage format doesn't support it.
Every single answer to this question always clones the whole repository.

Similar pages

Similar pages with examples

In other languages

This page is in other languages

Русский
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................