It is possible to download only a specific folder from a git repository, for example, if I have a project on github and it is made up of several folders, if at a certain moment I wish to download only a specific folder, is this possible ? '
It is possible to download only a specific folder from a git repository, for example, if I have a project on github and it is made up of several folders, if at a certain moment I wish to download only a specific folder, is this possible ? '
From Git 1.7.0 you can do a sparse-checkout
You have to start an empty repository first with the remote
git init <repositorio>
cd <repositorio>
git remote add -f origin <url>
// activar sparse-checkout
git config core.sparsecheckout true
To define which folders / files you want to receive, you have to define them in .gut / info / sparse-checkout, for example (content of the sparse-checkout file):
alguna/carpeta/
otra/carpeta/mas/
You can finally update your local remote repository:
git pull origin master
With git < version 1.7.0 there is no possibility of doing a partial check out.
The website link allows you to download the desired folder of a project, you just have to indicate the url and that's it, it's comfortable and easy.