Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

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.
Comment

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
Comment

git clone with subdirectories

git clone ... --recursive
Comment

PREVIOUS NEXT
Code Example
Shell :: git clean all submodules on branch switch 
Shell :: 20.04 
Shell :: pip install caffe 
Shell :: create a directory and change to it command line 
Shell :: how to remove all files with a certain file type in terminal 
Shell :: git stash 
Shell :: filter match in line sed 
Shell :: bash check if string does not exist in file 
Shell :: cli50 installation 
Shell :: how to make apache not run automatically linux 
Shell :: command to restart a system service 
Shell :: git go back to head after checkout commit 
Shell :: how to move files that begine with uppercase in linux 
Shell :: step6 pgadmin ubuntu 20.04 
Shell :: fold all lines in vim 
Shell :: linux get part of string 
Shell :: social app django 
Shell :: git rename older local commit 
Shell :: kali linux nit signing in 
Shell :: how to create a shortcut in ubuntu 
Shell :: bash setting home 
Shell :: how to download files using cmd 
Shell :: how to clone repo and change name 
Shell :: configure a subdomain apache windows 
Shell :: git remove large files with bfg 
Shell :: Error: Cannot perform an interactive login from a non TTY device 
Shell :: rsync delete old files 
Shell :: bash script template linux 
Shell :: git liste branches 
Shell :: restart service linux crontab 
ADD CONTENT
Topic
Content
Source link
Name
3+9 =