Search code examples
gitcompressionodt

Git with compressed archives


I have a a git repository of mine that's filled with a certain type of compressed archive (.odt, to be precise). The .odt is used as a whole to store a more complex text document (those made by libreOffice). However, despite them being plain text if you open up the archive and look at each part individually, the .odt, being a compressed archive file type, as a whole is obviously stored as a binary format.

Obviously this is useless for wanting to look at branch diffs, merge different versions of a document being worked on from different angles, etc.

I've looked around, and the most useful information I've seen is from over half a decade ago saying, "This isn't currently an option in Git, but it's being worked on.) Considering the amount of time that's passed, I'd say it's safe to ask...

Is there a way to use git to manage chosen compressed archives types as if they were folders instead of monolithic binary codeblocks?


Solution

  • The idea would be to not store odt files, but, as mentioned here, fodt files: it is the format recommended by LibreOffice for Version Control.

    the data is represented as human-readable text (which makes the work much easier for the version control system) and not compressed.

    (And Git itself would store them compressed internally anyway)