I have a keynote file in which I am regularly editing the text, moving slides around, etc. There are a max of a few kilobytes of data changed in the internal .key XML file. However, SVN recognizes this as a bundle and checks in the entire .3gb "file" with each change (I have a lot of high-res videos.) This is clearly not ideal. Is there any way to get SVN to recognize bundles as directories?

A similar answer for Git would be appreciated as well.

  • If it's zipped together in some way like ODF or OOXML files, you're probably SOL. That said, I've not used Keynote, so I couldn't say. – Mike Larsen Dec 8 '12 at 20:35
  • It's quite literally a folder, but with a bit set to make the OS "pretend" it's a file (explanation). So when git sees it, it thinks it's a file, and ignores the contents of the directory. I'm not sure when the compression takes place. – Armin Samii Dec 9 '12 at 23:54
  • I'm guessing it's similar to how it handles .app "files". Can you do an ls on the bundle and get the directory contents? – Mike Larsen Dec 10 '12 at 17:24
  • 1
    Looks like I am mistaken- the keynote is a Zip file, not a bundle. With proper search terms, I found a blog with a start: tante.cc/2010/06/23/managing-zip-based-file-formats-in-git - this will allow "git diff" to unzip the files and look at that diff. I'll look into combining this with commits. – Armin Samii Dec 17 '12 at 3:29
  • Please add your comment as an answer, so this won't be listed as "unanswered". – JonnyJD Dec 25 '12 at 11:24

Up to Keynote' 06 the .keynote file was actually a folder 1 like you mentioned. However, later the .key format is used and this is a zip file. 2

ZIP files are not a good format to be diffed, but you can add unzip as a diff handler in git.

You can also save the presentation in the old .keynote format. If svn still thinks the file is binary, you can use svn add --no-auto-props or svn propdel svn:mime-type. Files with no mime-type are treated as text files by subversion. 3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.