My local repository has about 500 files and a total size of about 125MB. I initialized a git repository on storage provided by "http://repositoryhosting.com/".
I did the following steps via Git GUI
It said that it uploaded onto the Remote Repo and I could see the files, but the repo now had a size of only 26 MB.
I tried to git clone and git pull on two different occasions on another machine from the remote repo. They seemed to download exactly the 26MB that was on the Remote repo. But when I check the size of the folder on the machine, it shows that it is 125MB.
Questions:
Git has a mechanism to compress all files (and indeed, all history) into pack files.
Running git pushall will now push all branches to all remotes.
Git LFS does not compress files. Some files are compressible, and some are not. It, like Git's partial clone feature, is designed to offload most of the data to a trusted server for the purposes of making local access lighter and cheaper.
Git Compression of Blobs and Packfiles. Many users of Git are curious about the lack of delta compression at the object (blob) level when commits are first written. This efficiency is saved until the pack file is written. Loose objects are written in compressed, but non-delta format at the time of each commit.
Does 'git push' compress data while uploading to Remote Repo?
Yes. It pushes diff delta pack files.
Am I losing data?
No.
Once you start working on a repo, you:
If I'm trying to make a copy of the Remote Repo on multiple local machines so that multiple people can work on the same project, do I use Git Clone or Git Pull?
git clone
for the initial copy and checkout of that repo.
Then git pull
.
Apart from what's already been said, Git's content-addressable storage model naturally deduplicates data, i.e. files with identical contents are stored only once. I highly doubt that this comes to play in your case, but generally and depending on what type of data you store this is another reason why Git's storage is fairly efficient.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With