From: Jakub Narebski Date: Wed, 22 Jul 2009 20:44:39 GMT Subject: Re: How to prevent Git from compressing certain files? Message-ID: In-Reply-To: <4A676D4B.7040004@dirk.my1.cc> Dirk Süsserott writes: > I'm (ab)using Git to store my media files, i.e. digicam pictures (*.jpg) > and the like. This way I can e.g. comment a series of pictures without > installing and learning a special purpose "Photo Archiving" tool. Gitk > shows the roadmap! > > Somewhere I read that Git isn't supposed to efficiently handle binary > files. Of course, I don't want to merge my files, just store them with > their history and git-push them to some "safe place". > > I figured that pushing and git gc'ing both try to compress those files > (or differences) really hard. Works great for "regular" files, but is > pointless with jpegs. > > Question: Is there a way to prevent Git from trying to compress certain > files based on their extension? There is _undocumented_ "delta" gitattribute, introduced in a74db82 (Teach "delta" attribute to pack-objects., 2007-05-19), which you have to unset. Like this: == .gitattributes == *.jpg -delta -- Jakub Narebski Poland ShadeHawk on #git