Live data from Hacker News

Ask HN: “Git” for Microsoft Office?

news.ycombinator.com

21–30 of 149 posts

Re: Ask HN: “Git” for Microsoft Office?

#23
post #20

First point. MS office documents have a vaguely capable version control system built in. It's not Git, but it may be enough. Second point, I haven't tested this, but docx, xlsx etc are XML based and may be happily Git compatible. Third point, if the above doesn't work, look into automatically saving / converting documents into and out of a Git compatible format with minimal loss of formatting etc. You may be able to…

Docx & co are XML based, but they are _zipped_, therefore binary. Which make a version control pretty much impossible.

I mean, git supports applying filters on the file for exactly this purpose? The content that is being compressed is likely going to still diff poorly, but git also supports custom differs for example that purpose, so I don't know why you are saying "impossible".

Re: Ask HN: “Git” for Microsoft Office?

#24
post #20

First point. MS office documents have a vaguely capable version control system built in. It's not Git, but it may be enough. Second point, I haven't tested this, but docx, xlsx etc are XML based and may be happily Git compatible. Third point, if the above doesn't work, look into automatically saving / converting documents into and out of a Git compatible format with minimal loss of formatting etc. You may be able to…

Docx & co are XML based, but they are _zipped_, therefore binary. Which make a version control pretty much impossible.

[deleted]

Re: Ask HN: “Git” for Microsoft Office?

#25

O365 has had live editing for a while now[1], it's not even that hard to use. You can have that Golden Version and everyone can suggest changes and edits, then the document owner can accept or decline the edits. [1]: https://support.office.com/en-us/article/Collaborate-on-Word...

Sadly, our Sharepoint implementation is "in progress", so $deity knows when we'll be able to use this consistently... Thanks anyway, I guess it's my only option.

Re: Ask HN: “Git” for Microsoft Office?

#26

This might not be exactly what you're asking for but I'll just leave it here in case someone finds it useful: A couple years back I built this: https://github.com/tomashubelbauer/modern-office-git-diff It is a pre-commit script which unpacks Office XML into text contents and tracks that alongside the source file. This way you can consider the binary to be a source of truth, but with each commit you also get a textual…

This is pretty cool, I might even use it for some personal stuff. Probably not enough for non-programmers, but could be the basis for something else to emerge.

Thanks!

Re: Ask HN: “Git” for Microsoft Office?

#27
My SO does a lot of document writing and editing. She doesn’t write code, but wants her essential stuff backed up somewhere. I taught her the concept of version control and she literally uses git for her office documents. Not a perfect solution, but not a bad one imo.

Re: Ask HN: “Git” for Microsoft Office?

#28
post #20

First point. MS office documents have a vaguely capable version control system built in. It's not Git, but it may be enough. Second point, I haven't tested this, but docx, xlsx etc are XML based and may be happily Git compatible. Third point, if the above doesn't work, look into automatically saving / converting documents into and out of a Git compatible format with minimal loss of formatting etc. You may be able to…

Docx & co are XML based, but they are _zipped_, therefore binary. Which make a version control pretty much impossible.

I never try, but I thought you just need to rename the .docx/.xlsx/.pptx to .zip, unpack them then do the version control on that files?

Re: Ask HN: “Git” for Microsoft Office?

#30
You might consider encouraging people to write markdown and then generate the final document using pandoc with an msword stylesheet.

This is what I did in college because (for some reason) everyone expects word files for everything.

Post reply on HN