Ask HN: “Git” for Microsoft Office?

145 points by toyg ↗ HN
I’ve recently changed job and now I am basically swamped in MSOffice documents. This makes collaboration very hard: people are fearful you’ll touch their precious files, there are manual procedures to produce “gold” documents, fixing a typo is an ordeal, and if the same slide is present in 15 Powerpoint decks any edit will require tons of mindless and error-prone copypasting... it made me realize how good developers have it with git, github, and the likes.

Is there anything out there, capable of working with MSOffice stuff in a granular and collaborative way? I can’t believe non-geeks have lived like this for 30 years.

148 comments

[ 3.3 ms ] story [ 215 ms ] thread
(comment deleted)
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.
Does this somehow prevent you from using Groups/Teams?

>if the same slide is present in 15 Powerpoint decks any edit will require tons of mindless and error-prone copypasting

This is exactly what you want SharePoint for. Have 15 people open the same PowerPoint deck, in desktop PowerPoint, editing the file simultaneously. It's fully versioned and you have no merging of files back together.

15 people opening the same deck is not the same as 15 people opening 15 different decks that have just one slide in common.
Google has this feature and it's a damn nightmare. If someone edits a deck but doesn't have permissions to the deck a linked slide is from, the link breaks. Also, changes made only flow one direction (master -> copies). There's basically no repeatable way to use it across multiple contexts. Slideware is not the same as modular code.
These are Google-specific implementation issue, there is no philosophical reason why a single slide could not be a modular, referenceable object. I bet the old COM stuff could do it (of course it would then break if the document was moved, but again, these are implementation-specific bugs).
I find if I enable edit permissions, people can do more than suggest changes, they can make them. An editor can turn off tracking, that has to be done frequently to fix formatting and layout issues, and changes aren’t visibly tracked.

I wish there was a “pull request” for office with a permission that allowed suggestions but not edits.

This sounds great... in theory. But has a pull request feature ever been created for a non-plain text format?

Intuitively, this doesn't really seem possible to me for a sophisticated document format. E.g., how would you represent a change to an embedded graph in a pull request? (And would that same approach scale to any form of embedded media?)

It's not an easy task, but it's doable! I co-founded a company called ProcedureFlow[0], that allows change requests but for hyperlinked flowcharts. My inspiration was 100% GitHub/pull requests.

A procedure is made up of many flows that are linked together. Everyone that uses the procedure views the "live" flows (like a master branch). Each user gets their own branch which we call a "draft". In a draft, a user is free to make any changes they want (add/delete/modify flows) and then submit all the changes for approval. Approving the change request then merges the changes into the "live" for everyone else to see/use. I even went so far as to build side-by-side diff of the flowcharts, rebasing/merging with live, and conflict resolution.

It's simplified in the UI so the terminology isn't 100% like git. But, one of our biggest hurdles though is actually teaching users how this works why it's better than the current mode of document locks/real time editing. And when our customers "get it", they really fall in love with the concepts and why it's better!

[0]: https://procedureflow.com/

My understanding is that collaborative live editing à la Google Docs was already here for Microsoft Office? E.g., I routinely edit the same Excel file from my iPhone, iPad, and Mac.

My current understanding is that live collaborative editing is the solution for the same problem version control solves for non-plain text file formats (and therefore, also the solution for non-programmers). Think of how much programmers complain about the complexity of git, and that's using it with plain text, a format that facilitates version control like no other.

For collaborating in every document format that isn't plain text, my solution has been to use live collaborative editing.

I mean, this is what Office 365 does - and pretty well: collaboration and versioning.
Versioning is good for restoring backups, it’s hard for seeing changes over time.

I recently worked on a word doc with four other collaborators. Someone inserted a footnote. Looking through versions it took me 10 minutes of sifting through the dozens of versions (auto save creates new versions very frequently) to find who and when that section changes.

I wish there was a git blame for office.

I also wish the old day of “checked in” versions where I could set a number and a comment.

>I wish there was a git blame for office.

That's exactly what "Track changes" is for.

Track changes can’t be turned on and off to replay versions. There is compare document, but it takes longer and is one version at a time.

Blame goes through the entire history of a file.

Technically, tracked changes and SharePoint. But in practice, you’d rather send the changes to the project owner via carrier pigeon.

I’ve looked into what it would take to make a git style system for docx (since it’s just zipped XML, right :D), and the file format was a nightmare whenever an edit was made. Someone smart should take a look at it, as there would be a massive market for a DVCS for Office files. Imagine a world where every bill in Congress was committed to a central repo so the whole world could see the changes, or where someone in your team wants to play with the formatting on a shared requirements document without breaking the page you’re writing on. It would be a boon for productivity.

My wife is a laywer and she and her colleagues (and the other lawyers they are working with) pretty much base their workflow for revising documents on track changes. I've never heard her complain about it.
Maybe she is used to it? I have used track changes and it is good and all ... but it may not be exactly the same as being able to know where and when a change was done, by whom, and with the reasoning sometimes added with it that comes from VCSs like SVN and GIT.
I think that's the point - if you use these things expecting them to work like a revision control system for code you'll be disappointed and frustrated.

Meanwhile, people who have no such expectations cope perfectly well.

> Meanwhile, people who have no such expectations cope perfectly well.

You know how they do that right, stay in online chats and ask who, how, why, when. Awful waste of efforts

> where and when a change was done, by whom, and with the reasoning sometimes added

On Office 365 at least, it does tell you all of those things.

Not laws, but some US gov tech strategies and policies are tracked and edited in GitHub. It looks like it’s not the literal authors making changes, but someone is making changes to markdown documents.

For example, the Federal Data Strategy, https://strategy.data.gov/overview/, is created from https://github.com/GSA/data-strategy

It’s been nice to follow updates and the specific changes using git diffs.

Or even just OneDrive -- SharePoint isn't strictly necessary anymore.
OneDrive is a client and api grafted on top of sharepoint. It's all sharepoint under the hood.

You also dont need to use OneDrive to sync SharePoint, you can use the File > Open menu to open in Word, Excel, PowerPoint to open files directly.

> as there would be a massive market for a DVCS for Office files

Would there, though? I mean, we HN readers want that, but I don't see any evidence that the average Office user is clamoring for it. Even comparatively crude systems like Track Changes aren't used in my experience as often as they could be, and those are a hundred times easier for non-technical people to wrap their minds around than a Git-like system would be.

I suspect that part of the reason this problem is so intractable is that it's really two problems. The first is actually tracking the changes to the underlying document, which, as you note, is hard enough by itself. But then on top of that is the second problem, which is that you'd also have to come up with an interface that could make the power of a Git-like system comprehensible to non-technical users. And you'd need to solve both problems to have a product that would actually be ready to take to market.

People get that mailing revisions of documents back and forth feels rickety. In my immediate circle I noticed that people some mild amazement that geeks use Wiki-style collaboration environments instead of office suites.
> I mean, we HN readers want that, but I don't see any evidence that the average Office user is clamoring for it.

My current experience is that non-geeks have no idea that another way of life is even possible. You won't clamor for something you cannot even conceive.

I bet that tons of orgs would rush to adopt a github-style workflow if MS made it available. After trying out the "Track changes" and collaborative modes people have mentioned here, I can see why people in my company don't use them - they are flaky and don't really enforce rights, they basically just nudge the user.

For procedure-style documents, I co-founded a company called ProcedureFlow[0] that allows change requests but for hyperlinked flowcharts. My inspiration was 100% GitHub/pull requests. We found that a lot of organizations store procedures in document form which change all the time. So, the purpose behind our product is to move away from a document into a format that easier to use/change/track.

Copied from another one of my comments in this thread:

A procedure is made up of many flows that are linked together. Everyone that uses the procedure views the "live" flows (like a master branch). Each user gets their own branch which we call a "draft". In a draft, a user is free to make any changes they want (add/delete/modify flows) and then submit all the changes for approval. Approving the change request then merges the changes into the "live" for everyone else to see/use. I even went so far as to build side-by-side diff of the flowcharts, rebasing/merging with live, and conflict resolution.

It's simplified in the UI so the terminology isn't 100% like git. But, one of our biggest hurdles though is actually teaching users how this works why it's better than the current mode of document locks/real time editing. And when our customers "get it", they really fall in love with the concepts and why it's better!

[0]: https://procedureflow.com/

Using Office365 versions with Track Changes turned on is probably the most viable option with normal people.

Technically, you could use git, and it works decently with the xml-based Office file types, but it's a hard job to get people used to the workflow, and things like merge conflicts are going to be even more of a headache.

> Using Office365 versions with Track Changes turned on is probably the most viable option with normal people

I beg to differ as normal people would expect their old documents to work, and the subset of things that work in web is not enough. Quite like LO-supported, totally not on par with native.

.docx is plain text xml though (You can even save explicitly as .xml which has all the images in base64).

Is track changes not good enough?

(1) Now you get to train your office mates who have been emailing .docx files to each other for twenty years in git, specifically to merge XML files.

(2) What happens when someone checks in a hand-reconciled merge that is not a valid XML file, because whoops?

(comment deleted)
I assume you’re not using the online version of Office 365. It’s collaboration capabilities are better than most people give it credit for.
Collaborative editing is supported by the desktop apps as well - I use it in Word a lot and it works pretty well. Your document has to hosted in SP online though.
Or Onedrive.
I think the backend for OneDrive for Business pretty much is SharePoint Online.
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 convince your team that this is an acceptable compromise between the tools they are used to, and the power of DVCS.

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".
> I mean, git supports applying filters on the file for exactly this purpose?

Indeed, pass (https://www.passwordstore.org/) uses this to allow diffing and sane tracking of its password files, even though they are binary encrypted GPG blobs.

(comment deleted)
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?
That works. It's clumsy, but can be automated.
That's what "flat" OpenDocument files are for. Use .fotd, .fods and then you can have all the file content, plus referenced images, objects etc. all separate files under version control without the zip container.

I do this with LibreOffice. I've not tested Microsoft Office with this workflow.

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 diff showing what changed content-wise. More or less.

Some person built the same thing for OpenOffice and I link their project in my readme, too.

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!

This feature now built into Word, and has been for some time. see my other comment in this thread.
Sure, it's probably better to use that if you don't mind that. I am big on plain-text files and Git and sometimes I have to bend reality a little bit in order to keep working my way when others won't. This is one of those cases.
I wasn't dissing yours - Sorry if it came across that way!
> I can’t believe non-geeks have lived like this for 30 years.

Given how shitty MS software has always been, I can't believe people not only pay money for it but also accept it as the norm.

As for your question, non-geeks have been coping with this by saving a copy of a document before each edit so that when the inevitable catastrophe occurs, they can roll back. As a geek, you can use git manually. Adding that as a feature to Office would make it even more incompatible with itself than it already is.

Ah yes, I love working out which is the most recent document out of:

* Document1 FINAL

* Document1 FINAL DRAFT (DO NOT EDIT)

* Document1 FINAL EDITED

* Document1 v2 FINAL

Outside of development work using repositories, I also handle a good amount of design documents, think Indesign/Photoshop etc. My workflow is like this:

- Substantial changes result in a new version number at the end of the file:

Document v34

- Branching to try out ideas uses a marker what this idea was:

Document v34-2 test-color-scheme

If the idea is approved, it results in a new version:

Document v35

- Tagging for long running designs adds the context where it was last used, this can be considered a final release version

Document v36 - July 2020 promo

Once a file is used like that, an export copy with the same name is saved in the same folder:

Document v36 - July 2020 promo.pdf

This document is copied using a general name and then moved to a different folder:

promo2020/july/flyer/Document.pdf

This is what is printed, e-mailed etc. Date and file size allow comparisons to find out which version this was.

While this falls apart for testing a lot of similar ideas at the same time, it has served me well to have a history of snapshots and their context, have all final documents archived, and ignore (or delete) all the versions in between, while still saving progress over days/weeks.

(comment deleted)
Could you use Google Docs or something similar for some of the more collaborative documents?
Would be also good to know if something similar exists for LibreOffice Writer.
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.
This looks very interesting but I doubt large enterprises will allow it considering the online nature and the inability to secure confidential work on internally hosted systems.
That's my reaction too - most people here are somewhat jealous of their "ownership rights" over this or that document, since this often define their actual roles. It looks like Fluid is trying to "share everything" and that's too much.

I'd be happier with something that simply allows me to have a github-like workflow where I can propose and justify changes to this or that block of document, and an owner can sanction and merge. This would not touch internal hierarchies (the most sacred element of corporate life) but would improve collaboration.

If Fluid is a step in that direction, it's welcome. Unfortunately to me it looks more like "web-native COM objects" and few people ever liked those.

> can propose and justify changes to this or that block of document, and an owner can sanction and merge

This is called 'Tracked Changes' and 'Comments' in Word. Under the Review ribbon.

Here's the How-To: https://support.office.com/en-gb/article/track-changes-in-wo...

I've tried the equivalent feature in Powerpoint and I'm not impressed. I gave permission to edit to a colleague (it's either that or readonly, as far as I can see in SP), let her change it, then looked at the document again. "Show changes" lasted a few seconds and then disappeared, never to return. And I guess the Compare items will only come up if you have a different file? Just opening the same file from SP, they are all greyed out...

Absolutely not comparable to a github experience, as far as I can see.

It’s going to be open-source, so I’d bet that Microsoft will package some kind of on-prem server like Exchange and SharePoint if enterprise demands it. But since lots of enterprises are moving to Office 365 anyway (including big banks that historically had massive security requirements), if Microsoft can make a security SLA, maybe it’s enough?
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.

Thays Why I use markdown and latex for everything. I was back in college 2 years ago, after 15 years. DOing mechanichal engeneer. All my reports where writen on markdown and latex, and saved on gitlab.
Now days I use asciidoc mostly because there’s an official spec and latex math and bibliography are included. Every markdown is different and that’s pretty frustrating sometimes.
One thing I did to make this hell more tolerable is I would write all my documents in org-mode (markdown) and use Pandoc to convert to MS Word format for distribution. My Word documents actually looked better than everyone else's. I was still able to use git to control the source of the documents.

Less than a year later I left that job. I'd rather learn a trade than be paid to use MS Office.

Nongeeks haven't been living with this. They (mostly lawyers) use document management version control systems like iManage ( https://imanage.com/product/document-email-management/) and professional comparison software like Workshare Compare https://www.litera.com/products/legal/workshare-compare/ (orders of magnitude better than tracked changes in Word though Word has gotten better over the years).
This is the sort of answer I was hoping for. Workshare-Compare looks pretty cool (if not cheap).
I second this. Medical, Aerospace, and Government, and other engineering also use these systems. Start looking at official documents -- you'll often see something in the footer like, in tiny font, that looks like 23-14453 Rev 8 -- that's usually a Document ID number and the revision number. With my company, whenever we want to Rev a document (make changes and create a new revision), we make the changes with Word's "Track Changes" turned on, which produces what we call "Redlines" -- a Diff between that version and the previous version. We check that into our Doc Control along side the document without the Redlines. This doesn't really help when comparing Version 3 with Version 8, but as others have pointed out -- you can use Word's "Compare" if you really need to do that.

Part of my company uses SAP for their doc control, part of my company uses MasterControl. I hate hate hate SAP. I have a few bones to pick with Master Control, but overall, it's tolerable. If you'd like to chat more about how this process works in the workplace, you can find me on twitter @failbridge or on reddit as /u/daveslash

Office 365 with documents stored in the cloud. #formerMSFT
If you use svn or git to track your files, both TortoiseSVN and TortoiseGIT when asked to compare two files (ie, "diff from last revision) will spawn the version manager integrated in office.

Is not perfect but it works.

Tested with TortoiseSVN 1.11.1, TortoiseGIT 2.10.0.2, MS Office 2010 on docx documents.

Working on it: https://julesdocs.com

It’s very hard though, because the files combine data and styling. Plus, the data is spread over several XML files.

If you want to message me: jan at the domain above

Edit: While Google Docs, Office365 and other collaborative editors are great for editing a document at the same time, from my point of view the real power of Git is branching, merging, and having a concept of distinct versions (which may consist of several files).