Reduce directories' sizes by using `git clone --depth=1`
sidahmed-malaoui opened this issue · 1 comments
sidahmed-malaoui commented
We can reduce the size of tools cloned with git by using git parameter --depth=1
. This parameter allows us to clone only the latest commit. And when we want to update the tool, we can use git pull
as usual without any problem.
Examples of space we can gain with some tools :
With radare2
:
git clone https://github.com/radareorg/radare2
du -sh radare2/
> 176M radare2
git clone --depth=1 'https://github.com/radareorg/radare2'
du -sh radare2/
> 62M radare2
With beef :
git clone 'https://github.com/beefproject/beef'
du -sh beef/
> 45M beef
git clone --depth=1 'https://github.com/beefproject/beef'
du -sh beef/
>35M beef
If you like the idea, I can do a small pull request for that if you want.
HackingDave commented
Sounds good to me, feel free to submit the PR. I like it.