8
I read a while ago that it is possible to clone a repository in a more performative way just by downloading the last commit, that is, download the repository without previous changes of other commits.
How can I do that?
8
I read a while ago that it is possible to clone a repository in a more performative way just by downloading the last commit, that is, download the repository without previous changes of other commits.
How can I do that?
11
Use the switch --depth
:
Example:
git clone --depth=1 <url_do_meu_repositório>
Note however that this practice of Shallow copy (SVN style) is not usually the best solution in the Git world for a number of reasons:
filter-branch
and purge
to decrease the size of very large repositories. Alternatively, if you really need to, you can clone a single branch:
git clone -b meugalho --single-branch <url_do_meu_repositório>
Browser other questions tagged git github
You are not signed in. Login or sign up in order to post.
Well completes the answer!
– Rigotti