11 ms·
Another advantage to plain text files: source control. You can check your writing into git and get a history of all your edits. It’s something programmers take
by imgabe 5y ago
Another advantage to plain text files: source control. You can check your writing into git and get a history of all your edits.
It’s something programmers take for granted, but it would be amazing if this got more widely adopted outside of tech. The number of files with names like “Report Final Final draft v3.docx” is truly staggering.
“Git for everything“ would be a multi-billion dollar startup easily.
- niutech 5y agoAs for "git for everything", try SparkleShare or LogicalDOC CE.
- bob1029 5y ago> “Git for everything“ would be a multi-billion dollar startup easily. In addition to plaintext documents, I have found that a simple JSON diff is also a very effective way to demonstrate changes between 2 complex biz objects. Non-developers can cope with this as long as the differences are visually obvious (red=removed, green=new, etc) and the object graph is reasonably flat. Everything can be trivially serialized to a JSON document, so this scales super well in my experience. We use a port of Google's DiffMatchPatch to generate human-friendly HTML reports of object diffs in our latest administration tools.
- jollybean 5y agoGit is barely useable by technical people. Git would be a byzantine disaster for 'everyone else'. The graph and abstractions involved introduce enormous unnecessary complexity. Now, 'historical changes for everyone' - yes. But not Git. Git is very powerful, but ultimately a questionably valuable product in many cases overall. And we've now settled on it, so it's a bit difficult to displace.
- yarky 5y agoI was actually surprised : last time I used Git Bash on Windows it did work quite well with .docx files. Then I switched jobs to avoid touching .docx files ... The best alternative I've found to generate .docx output is R markdown, which uses pandoc under the hood and let's you program the whole document the way LaTeX would.
- IceWreck 5y agoIsnt docx binary ? So git is storing a new version of the file every commit. That way too much storage space youre wasting.
- BerislavLopac 5y agoThat's exactly what the actual git does too.
- testermelon 5y agoI've heard somewhere that docx is actually gzipped xml. But I never really confirmed that myself. But it's binary once gzipped, so your point still stands.
- simion314 5y ago>I've heard somewhere that docx is actually gzipped xml. But I never really confirmed that myself. docx and epub are zip files, you can rename them with a .zip at the end and open to see what is inside. It might not be as simple to zip them back, at least for epub is very important to zip the files in a certain order but I forgot the details, but is easy to do from command line.
- bellweather49 5y agoOr use Vim; it has built in support for zip files, so you can just type something like `vim my_file.docx` and it will open the files in netrw (the built in file explorer). Move to the file you want and hit enter. "word/document.xml" has the main document contents in it. The xml will probably need to be run through a formatter to be readable. You can type `:%!xmllint --format -` if you have xmllint installed. Now prepare to spend several hours trying to make sense of the xml. :-p
- simion314 5y agoVim is not for me, I unzip the epub/docx and then open the xml/html files in Kate, I had to do this to examine what is saved or how it saved or if my custom epub exported worked correctly. For epub I think you need to make sure the metadata file is the first one in the archive for it to work(so not sure if editing stuff directly in vim will preserve the order)
- Seirdy 5y agoYeah, in high school I and another student did our essay peer reviews using annotated diffs once. It was so much easier than Google Docs, since we didn't have to leave our editors. Wrapping version control with a non-tech-friendly porcelain could help a lot of people escape user domestication from vendor lock-in.
- copperx 5y agoI don't care how much porcelain you add. Using git effectively beyond add and commit requires undestanding quite a few concepts. Mass adoption of git in the consumer space ain't happening anytime soon.
- greyhair 5y agoIt cracks me up that this many years later, you put five people in a room to establish a git branch/merge/release strategy, and you get five very different opinions, and such strong opinions they are. Luckily, that responsibility is not in my wheelhouse, I just have to live with whatever decisions are made. So yeah, mass adoption in the consumer space, I don't see that happening. A revert or a rebase gone wrong and wails of "what happened to my file?"
- yjftsjthsd-h 5y ago> "Git for everything“ would be a multi-billion dollar startup easily. AIUI, git is already prepared to be that, it just needs diff programs that can handle whatever format. I mean, other than git's interface being its own impediment to non-technical users.
- loudmax 5y ago"Report Final Final draft v3.docx" is in a proprietary format format controlled by a single company. The spec may be open in some sense, but it's far from a level playing field.
- sgjohnson 5y ago> is in a proprietary format format controlled by a single company. It's not proprietary by definition. A nightmare to implement? Yes. But definitely not proprietary.
- _dain_ 5y agoIt doesn't follow the published open spec so it is de facto proprietary.
- yjftsjthsd-h 5y agoRight, but if that company released a diff tool for docx (or someone reverse engineered one), git would work with it. I don't expect that to happen, I'm just saying git isn't the limiting factor.
- sgjohnson 5y agoPre-commit hook to convert to plaintext or markdown[0]. And there you go, a human readable diff. [0]https://github.com/benbalter/word-to-markdown https://github.com/benbalter/word-to-markdown
- Swizec 5y ago> The number of files with names like “Report Final Final draft v3.docx” is truly staggering. iirc this was the original pitch for Dropbox > “Git for everything“ would be a multi-billion dollar startup easily. Dropbox is valued at 8.5 billion
- ovao 5y agoDropbox version history is limited to 30 days (free plan) or 180 days (paid plan)[1]. I like Dropbox, but for documents, 30 days worth of version history is not fantastic. [1]: https://help.dropbox.com/files-folders/restore-delete/version-history-overview https://help.dropbox.com/files-folders/restore-delete/versio...
- squeaky-clean 5y agoThe original pitch was "throw away your usb drive", I don't think file history came about until after 2010, but I'm not too sure and modern Google makes it impossible to find anything older than 2 years ago... https://news.ycombinator.com/item?id=8863 https://news.ycombinator.com/item?id=8863
- slightwinder 5y agoIt's not that hard to search for old content on google. Just limit the year in the search filter. Anyway, I found mentions of this feature up to 2008 back. I guess it was there since mostly the beginning. From Sep 15, 2008: https://www.maketecheasier.com/dropbox-backs-up-and-syncs-files-from-your-desktop/ https://www.maketecheasier.com/dropbox-backs-up-and-syncs-fi...
- chupchap 5y agoIsn't that what Google Docs does already?
- ryanqian 5y agoI like this too, easily share is really a huge plus for any type of format text.
- judge2020 5y ago> “Git for everything“ would be a multi-billion dollar startup easily. Version control with online MS Office and Google Docs seems to be going pretty strong.
- dpcan 5y agoI think my Dropbox is already basically this. It has a revision history of my text files I think.
- dpcan 5y agoDropbox does this but it’s limited to a certain number of days, so not the exact same thing. I love the idea of a simple hit for everything.
- brightball 5y agoOne of the big things I love about Dropbox is automatic version control of the file. Google docs has a similar feature built in too I think.
- innomatics 5y agoI switched from dropbox to mega years ago when the former removed Linux support. TIL mega have version support so I need to enable that and try it out. First thing I do on a new device is setup my mega shared drives - and there is a lot of plaintext files there!
- orhmeh09 5y agoDropbox removed Linux support? It seems to work fine for me on arch Linux with btrfs.
- innomatics 5y agoIt was sync specifically, and four years ago. Maybe it works now. https://news.ycombinator.com/item?id=17732912 https://news.ycombinator.com/item?id=17732912
- 10729287 5y agoIf I remember well, they removed the ability to host Dropbox folder on a encrypted drive.
- brightball 5y agoBeen using it on Linux for many years but it does feel like their Linux support has gotten worse.
- slightwinder 5y agoDropbox never removed linux-support at all, or sync specifically. They removed support for some esoteric filesystems which lacked certain features. For most people dropbox on linux did not stopped working.
- deepGem 5y ago"Git for everything" is the first thought I had when I opened this article. I am trying to keep all my notes in Google docs and it's all good as long as you stick to their format. I can't edit text files in Google docs ! I mean, how absurd is this. I feel like building a Google docs clone for simple text files. Just one feature - versioning (A Time machine like interface) and perhaps add collaborative editing later. I just want to write and store a text document without having to create multiple files. Automatic versioning of snapshots so I can go back in time and refer to any timestamp.
- jsnell 5y agoHave a look at Etherpad.
- phreack 5y agoI once thought git for humans would be a great idea but never got around to speccing it out. Later on, a lawyer friend showed me the software they used 'for backup' (that they paid thousands per month for) and it turned out everything about it was just exactly like SVN. The terminology was different, the UX was laser focused to the intended users, but at the end of the day it was commits, syncs, merging, pretty much everything but branches, just laid out with domain specific language instead, professional office UI and simple UX. So, uh, yeah I agree absolutely with you.
- vertis 5y agoEnterprise Content Management like EMC Documentum has this sort of thing baked in (it's been a long time, but they're definitely on top of it). But that's for big companies.
- ben174 5y agoI tried to git my resume once upon a time. It's still something I'd love to finish doing, it just makes sense to have a git repository as a timeline of your life: https://github.com/ben174/bugben https://github.com/ben174/bugben
- thefunnyman 5y agoI do the same by having my resume in latex which I’ve checked in to git. Been meaning to write a GH action to generate the pdf artifact automatically.
- tomrod 5y agoI've decided to migrate my CV to Markdown instead -- pandoc can dump to LaTeX, PDF, you name it.
- chrisfinazzo 5y agoI eventually settled on LaTeX - although I considered dropping all the way down to groff/troff and having TeX be an intermediate step in the process. Custom LaTeX classes made this more trouble than I was willing to deal with, so I decided to not pursue it further. I suspect Markdown might have similar challenges dealing with this, although given that the "verbose mode" is just HTML, I might be able to make it work.[1] The print media type has been around for eons, but the @page rules don't support everything I need and are generally absent in WebKit browsers. [1]: https://github.com/chrisfinazzo/resume https://github.com/chrisfinazzo/resume
- thrwawy283 5y agoOkay. Agree entirely. I love some of the collaborative nature of Microsoft Teams and CRDT editing Word/Excel, but I'm usually pretty remote. Text over a tenuous WAN connection is ideal. I work at a government agency and I was /just today/ getting them to review and approve Git and VS Code for our staff use - and pandoc. A couple years ago we never would have gotten open-source software approved. I wish I knew of an equivalent to SELinux or AppArmor for Windows so they could lock down things a semi-trusted application can do. VS Code will be used in a few different departments, but I mostly want it to help those unfamiliar with Git and its CLI (Git Graph is nice). There's a trick out there to first convert things like Word documents to Markdown, and then do a diff of that intermediate output: https://hrishioa.github.io/tracking-word-documents-with-git/ https://hrishioa.github.io/tracking-word-documents-with-git/ Pandoc can only do so much. I'm trying to convince my part of the gov to put policy documents we disseminate to staff in a git repo, so we can track who did what and why (based on commit messages). This will be a big step, but thankfully one part of our org is already moving toward version control for IT and data analytics so I'm proposing this and suggesting we hop on their bandwagon. Momentum. There's a Word template that we commonly use for legal purposes where it gives you line numbers and you write text to align with the numbers. When reviewing it's easy to say "change line 23 to read ....". This - for example - will not translate well through pandoc because the numbers and the text are separate text elements. There's a market for making pandoc better. Visually translating how elements "flow" from 1 format to another, instead of simply transpiling XML to Markdown. I'm still excited thinking in a year I might be able to git-blame the legal department for things. Or see a diff from 1 administration to the next.
- copperx 5y agoI love pandoc and git and writing text files, but oh my, unless the users in your organization are tech savvy, your scenario sounds like a recipe for disaster.
- thrwawy283 5y agoAdmittedly, if there's any chance to this I think it will start with tech-savvy assistants helping to preserve documents on the backend of things. When a process takes hold budgets usually get restructured and a dedicated application is contracted around the existing process or data. I'm at minimum trying to prove the value of strict version control in my space :)
- nuker 5y agoBut can you use git for the .docx files?
- sgjohnson 5y agoYou can, but .docx is binary (it's .zip, and the Word document itself is OpenXML) So you won't have a neat revision history, unless you implement something in the pipelines to also convert .docx to something human readable, because .docx and OpenXML isn't.
- D13Fd 5y agoHonestly I think modern Sharepoint/OneDrive based .docx files have already leapfrogged git for the average user. In an office environment, modern MS Word gives you a really nice version history, with automatic or manual/named versions, plus multi-user simultaneous editing, with a slick and fast UI. It’s even cross platform - I send a coworker a link to a document, and they can open it and work on Word for Windows while I edit the same doc on Word for Mac or even on the web-based Word. It’s shockingly good.
- xerox13ster 5y agoThat's not plain text and not easily parse-able with mutli document search
- CorrectHorseBat 5y agoAfter not using Word for years we've been using it for a few months now for a project, expecting it would be decent. While some of the ideas are great, the overall experience was pretty bad. Leaving autosave on often slowed down Word to an unworkable pace and after a few other issues (I'm not exactly sure what, wasn't involved) we just made sure only one person at a time works on the document. Some other annoying small issues I experienced: when working together sometimes your undo history is gone. I guess that's because someone else edited too and correctly undoing something someone else edited in between is not simple. IMO it's impossible and any system doing merges automatically will fall apart at some point. Track edits cannot track deleting rows of a table Wed based word works actually pretty fine, but it misses random features. Adding captions seems not to be supported.
- yarky 5y agoI agree, I also expected the whole office365 ecosystem to do what's supposed to, but I also found it useless due to the slowness and errors the whole team kept getting while working on the same file. That and the fact that it somehow feels like the Mac version of their products always comes with a bonus bug. Don't event get me started on their web versions. It's the little things...
- D13Fd 5y ago
- accrual 5y ago> "Git for everything" macOS Time Machine and Windows Shadow Copy aren't perfect git-based versioning systems, but it's nice something in the general direction exists. https://en.wikipedia.org/wiki/Time_Machine_(macOS) https://en.wikipedia.org/wiki/Time_Machine_(macOS) https://en.wikipedia.org/wiki/Shadow_Copy https://en.wikipedia.org/wiki/Shadow_Copy
- m_eiman 5y agomacOS also has support for local file history, even if many apps try to ignore these features: https://support.apple.com/sv-se/guide/mac-help/mh40710/12.0/mac/12.0 https://support.apple.com/sv-se/guide/mac-help/mh40710/12.0/... When they introduces this they changed the standard file operations and replaced "Save as…" with "Save a copy" - this was not universally welcomed.
- pokstad 5y agoNB does exactly this: https://github.com/xwmx/nb https://github.com/xwmx/nb
- anta40 5y agoInteresting, as much as I admire Evernote, I want something that is open source and can be installed locally. Of course, Git integration is another plus point.
- jandinter 5y ago> “Git for everything“ would be a multi-billion dollar startup easily. Worked on a “Git for Word” project [1], which is currently on hold. The diff part was manageable, though not trivial to get diffs that make sense for prose/regular text. The hard parts are UX/UI (making Git concepts transparent to “normal” users) and merging. Yet without automatic merging, branching is not very convenient. Would love to collaborate on this in the future again. Reach out if you are working in this space, happy to share. [1] https://julesdocs.com https://julesdocs.com
- koolba 5y agoI’ve had better than expected success with diffing word files by converting them to markdown via pan doc. It’s nowhere near perfect as you lose nearly all formatting, but if only the actual text content is changing it allows you to automate the display of those changes.
- willis936 5y agoI don't think merging will ever be fully solved by software. It's a problem created and solved by process. How annoying merges are is entirely dictated by process. Sourcetree is the best git GUI I've used. That could be used as a model. I think an old-style solution to merging would be fine: output a word file that uses a unique font style to indicate which user made what conflicting changes, have the user edit the document and remove all of the "merge styles", then continue.
- nly 5y agoIt works well if the text format in question is line oriented, otherwise it doesn't.
- vishnugupta 5y ago> “Git for everything“ Just to show how useful this is here’s Indian Constitution with amendments as commits: https://github.com/anoopdixith/TheConstitutionOfIndia https://github.com/anoopdixith/TheConstitutionOfIndia
- yakubin 5y agoThe idea is pleasing, but when you specifically look at Git, its UX is rather disappointing. I'm not even talking about the CLI (after a while you can get used to it). I'm talking about resolving conflicts. If I have a sequence of changes A -> B -> C, then I change A and rebase B on top of A resolving any conflicts, then rebasing C on top of B will most of the time mean that Git will most likely ask me to resolve the same conflicts all over again and more. The kind of conflicts is also staggering. Each time I look at the conflicts it generated, I cannot explain how it could come up with that craziness. And all the while it also merged some changes without signalling conflicts, but instead breaking something in significant ways, without notifying me in any way, i.e. silently breaking something potentially important. From what I've read, Pijul should fix at least the problem of needing to resolve the same conflicts multiple times over and over again. However, I feel that version control focused on text breaks, because the merging algorithm doesn't know anything about the semantics of what's represented in text. So yes, I'd say that version control in more areas would be nice, but one based on binary formats understood by version control. One glimpse of that may be KeePassXC, which can merge password databases and has never done it wrong in my experience.
- vlovich123 5y agoHave you tried git rere?
- yakubin 5y agoNo. That's the first I'm hearing of it. Thanks. I'll try it in the future.
- Hackbraten 5y agoWhile I agree in that Git’s UX is abysmal for the beginner or casual user, no one should have to endure resolving the same conflicts over and over again. In my opinion, the following configuration should have been the default with Git: git config --global rerere.enabled true git config --global rerere.autoUpdate true The `enabled` part means: transparently record all resolutions in a database, and re-apply them whenever bumping into the same conflict with the same pair of files in the future. The `autoUpdate` part means: every time you finish re-applying a recorded resolution, please `git add` the result automatically for me so I don’t have to look for a "conflict" that’s actually no longer there.
- ho_schi 5y agogit --everything-is-local Which is the next thing. Git works just local and uses servers to sync. The purpose of servers is syncing and not depending on them. From this everything else comes, autonomous usage, speed, reliability, recovery.
- kumarsw 5y agoI wound up writing dupver https://github.com/akbarnes/dupver https://github.com/akbarnes/dupver after getting frustrated with the lack of versioning tools for binary files. One neat thing about .docx files and their ilk is that they are "just" zip files so it isn't hard to add special handling to pull out their contents and run deduplication over that.
- trevormeier 5y ago> “Git for everything“ would be a multi-billion dollar startup easily. Didgets (recently surfaced here on HN) seems like a sane approach to this, from the file system up. Pretty incredible performance too. https://didgets.substack.com/p/where-did-i-put-that-file https://didgets.substack.com/p/where-did-i-put-that-file Sadly not (yet) open source, though the developer is considering it.
- Matrixik 5y agoI mourn that StackEdit [1] got abandoned. It's online markdown editor that can use git as a backend. Fully cross platform editing (in browser) with synced all text. I used it with GitHub private repository for all my notes but editing on mobile was really buggy. So I moved to notion (unfortunately). [1]: https://github.com/benweet/stackedit https://github.com/benweet/stackedit
- chubot 5y agoYup, that's basically the same argument I'm making with this diagram -- with text, you can get useful operations "for free" http://www.oilshell.org/blog/2022/02/diagrams.html#text-narrow-waist-of-unix-architecture http://www.oilshell.org/blog/2022/02/diagrams.html#text-narr... https://news.ycombinator.com/item?id=30483914 https://news.ycombinator.com/item?id=30483914 It's generally not something you want to reimplement ...
- conductr 5y agoI feel like this is a solution without a problem. Or a problem without pain. Most people have no issues navigating a full folder of revisions to get to “Report Final Final draft v3.docx” but anything resembling version control would simply be unused. At corporate level, the version features of box.net, egnyte, and others are rarely used. I'd say most people don't even know they can navigate the revisions until they are in a data loss situation and asking about how to recover a corrupted file (which occurs most frequently with Excel files in my experience)
- deleted 5y ago[deleted]
- rmbyrro 5y agoI thought Google Doc had solved this with single-version model and automatic change history with easy restoration.