We use .docx and .odt for our "human-centric" documentation, but these formats are pretty much the worst you can do to a git repository.
Is there some git-friendly format that offers basic word-processor functionality and contains everything in one file?
This format lists the commits in the range like git-submodule summary does. When --submodule=diff is specified, the diff format is used. This format shows an inline diff of the changes in the submodule contents between the commit range. Defaults to diff.submodule or the short format if the config option is unset.
You can also use libreOffice/open-office-spreadsheet-non-zip-xml-fileformat "*.fods" which is plain xml. @glenatron s comment applies to this format, too. The standard open ofice spreadsheet format "*.ods" is zipped xml and not so suitable for git (similar to @Egryan/@emuddudley answer). I would like to avoid XML.
The resulting set of commits is the symmetric difference between the two operands. The following two commands are equivalent: The command takes options applicable to the git-rev-list [1] command to control what is shown and how, and options applicable to the git-diff [1] command to control how the changes each commit introduces are shown.
If we create our documents in Markdown, then using Git will look quite natural. And that would be fine if not for our second condition: “as a result, you want to have a document in a certain format, having corporate style attributes, and created according to a certain template” (and we agreed at the beginning that it would be MS Word).
There are many formats that are text friendly. For example:
[GitHub Logo](/images/logo.png)
with markdown or <img src="images/logo.png">
in html). It's not so handy as with copy/paste in a docx or odt, but it's git friendly, especially if the pictures don't change too oftenShort: use *.odt
(LibreOffice Writer) and ReZipDoc (GPLv3) (disclaimer: I maintain it)
Explanation:
Quite some binary formats - among them docx
(MS Word) and odt
(LibreOffice Writer) - are just ZIP files that contain text- and binary-files.
Using git filters, you can re-zip these without compression, which makes them much easier to compress for git, saving a lot of space in git history. This also leaves them in quite diff friendly format, without using an extra diff workflow. Still, most editing software has no problem using these files instead of the compressed ones. The main downside: Each person working on the repo has to install the filter(s)
The ReZipDoc (GPLv3) tool is made for this workflow; it contains a git filter.
The more and bigger binary files (like images) you use within your documents, and the less often they change, the more space you will save each time the text parts of your documents change, compared to not using a filter like this.
I must say though, that technically speaking, and also personally, I would also recommend Markdown over such a solution. There are already nice GUI editors available for it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With