Meaningful diff for LibreOffice files in version control

| Comment

I came across this tip on Martin Paul Eve’s blog:

In any case, the key thing that will make this viable for me is having a way to see the diffs within an OpenOffice (or LibreOffice document), so I want to share how I’ve got that working (I’m using Linux Mint).

As per the gittips wiki, I added the following to ~/.gitconfig

[diff "odf"]

Then, once you’ve initialised the repository in the working directory for your new writing (“git init”), add the following to that repo’s .gitattributes file:

*.ods diff=odf
*.odt diff=odf
*.odp diff=odf

Of course, there’s always the option of writing in markdown, and converting to ODF (or HTML, or PDF) only when releasing the text.

Category: Software

Tags: git, odf, odt, libreoffice, versioning