----- Original Message ----- 
  From: Daniel Harris 
  To: Git for human beings 
  Sent: Tuesday, May 03, 2016 10:43 PM
  Subject: [git-users] How do you git archive a branch using gzip with highest 
compression level?

  I'm trying to git archive a branch using gzip with the highest level 
compression (9) but it seems to not compress at that level. Here is my command:

  git -C /home/user/example.com/ archive --format tar -o 
/home/user/site_backups/develop-`date +%Y-%m-%dT%H%M`.tar develop | gzip -9

  It creates the tar file but the size is over 100MB compared to a zip that was 
compressed at 86MB using this command:

  git -C /home/user/example.com/ archive --format zip -o 
/home/user/site_backups/develop-`date +%Y-%m-%dT%H%M`.zip develop

  Can the output file be compressed more? What am I doing wrong?

I have a memory of a comment elsewhere about how the different files are either 
compressed separately, or compressed together, depending on which version of 
zip is used. 

If each file is compressed independently then the archive size can't be reduced 
by de-duplication. It's maybe something to google for.


You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to