5 ms·
git clone uses hardlinks to reuse object storage if you clone a local repository. I use it when I need another working copy, that way you save some space. And t
by Maakuth 9y ago
git clone uses hardlinks to reuse object storage if you clone a local repository. I use it when I need another working copy, that way you save some space. And time as well as you don't need to pull it all from the network.
edit: Local in this case means cloning inside one filesystem. Hardlinks cannot span filesystem boundaries of course.
- xorcist 9y agoJust out of curiosity, what is the use case for having multiple local clones? Is it to test run pruning or manipulate the reflog? Or is it for developing on git itself?
- Maakuth 9y agoI typically have some development ongoing on one clone and use the other to do merging for releases and so on.
- xorcist 9y agoWhy? Isn't the whole idea of using git that changing branch is just as simple/fast as doing "cd"? You're probably not doing your ongoing work in the branch you are merging for release anyway, if you did you'd have solve any conflicts all over again when you switch clone.