Readit News logoReadit News
Posted by u/deafpolygon 3 years ago
Ask HN: Best way to version control your notes or documents?
I see git as a pretty popular way to version control your code, and to an extent, your documentation. For my code, I think it's great.

For people with other types of documents, is git still ideal? I find git a bit lacking, and I'm not aware of any other solid version control system geared towards writing (notes, journals, books, articles).

j3d · 3 years ago
I recently switched from using Google Docs to storing my notes in Markdown/Git and making them available just to myself via Docusaurus on a private Gitlab Pages repo.

Benefits: 1. Free 2. Securely available from any web browser. Only people added to you repo can access the published notes. 3. Clean interface with solid search capability 4. Versioned 5. Easy cross-linking 6. Can edit locally or on the web, both with preview

Cons: 1. Requires a little upfront setup. See [0] 2. Requires familiarity with Markdown 3. Requires free Gitlab account

I am pretty happy with this now. I'm able to organize and search my notes at https://<gitlabusername>.gitlab.io/<repo name> and the 1-click edit link takes me to the Gitlab web IDE where I can make changes, see the preview, and commit changes.

[0]: https://jedfonner.com/2023/01/22/private-kb

eevmanu · 3 years ago
IMO having your notes locally (instead of using a any `webapp` or `local-first webapp`) + confortable editor (as example, `vscode`) + search tool with a decent speed (as example, like `ripgrep`) is unbeatable.

if you require to sync and save your notes, create a private repo and create a shortcut to do a commit with blank message (`git commit --allow-empty-message -m ''`) + pushing to remote repo at your demand whenever you need it (could be useful to put it in a cronjob)

you won't create an interesting history on your repo but ultimately, regardless of third-party feedback, it must be useful to you.

PD: execute chatGPT-like searches on your own local personal documentation (knowledge base) which automatically scrape content from any link you saved and retrain the model at your demand without the need to pay a monthly subscription would be amazing.

eevmanu · 3 years ago
PD2: looks like today, two tools to achieve chatGPT-like searches were announced:

- Supabase Clippy ‣ https://supabase.com/blog/chatgpt-supabase-docs

- Medable.ai ‣ https://www.mendable.ai/

deafpolygon · 3 years ago
This is kind of what I'm doing now. I have two scripts - push-notes and pull-notes and I call them when I need to. Git doesn't really provide a good interface for tracking notes and document changes, but it's all I've got for the moment.
h0p3 · 3 years ago
I can tell you how I do it, but I dunno if that will be useful to you.

Every time I save an edit to a page in ⦗ℍ𝕪𝕡𝕖𝕣𝔱𝔢𝔵𝔱: h0p3⦘, two jsons are created in a subdirectory of `~/Downloads`, an old and new copy of the edited page. That's usually the only versioning I directly use. I'm finished editing the majority of pages within a week (except for retroactive footnotes, which are themselves dated upon injection), but there are some pages I've edited thousands of times; all of it is captured, and I can archive or delete these at my leisure. Sometimes, I'll walk through my nightly zstd archives (and I've not had to go through my waterfall backups across drives yet), and even more often just use web.archive.org (since it's all wrapped into one html file). I've always wanted extremely lightweight automated versioning (not what I already do by hand, as I sometimes explicitly link together versions of a page) built into my wiki itself (none of the plugins available really do it well, imho), and I may work toward that.

I do have git repos available, and I know some found it useful. Traditionally, I keep a 2-minutely updated git repo (reset nightly), as well as a nightly. Something has gone wrong when I use it, but perhaps that's a lack of practical creativity otherwise on my part. For those participating in the mutable torrent swarm, hidden default Resilio Sync archives have provided useful versions to myself and others as well.

I'm paranoic about keeping a record of my streams of thought and the objects I grow in my garden, and I often find the most important aspects of the versioning of my thinking (and feeling) are captured by just thoroughly using and living with the tool in the first place.

jayflux · 3 years ago
I tried using git for general note taking and I hated it. I used Foam, which is markdown inside of VSCode synced to Git, accompanied with GitJournal which allows you to update the same markdown files from a mobile device.

Constantly putting in commit messages, dealing with conflicts, and syncing became annoying to the point it put me off making notes. For me, notes should be quick and frictionless. I am sometimes in a position where I’m away from the computer and want to take a quick note of something on my phone.

So I switched to Joplin (markdown based but has a sync feature you can self-host), then I can move notes to git once they’re in a state I want to publish or have more long term storage. Joplin is basically an open source equivalent to Evernote, it does the job and I get to keep the format in markdown.

It doesn’t have version control but there was a request to add this some time ago https://github.com/laurent22/joplin/issues/753

theknarf · 3 years ago
For personal notes I mostly use Notion. But for a while I used Obsidian with markdown files stored in a Git repository, this mostly worked fine.

In a professional capacity I use Docusaurus for project documentation, this is stored in the same Git repo as the rest of our products source code (so one monorepo both for code and documentation).

deafpolygon · 3 years ago
I haven't really heard about anyone going from Notion to Obsidian. What does Notion do right? I find the lack of local files a bit disturbing.
jjwtieke · 3 years ago
Word and G Docs both have versions. You can, with some limitations, go back and view an earlier version of a document you’ve been working on. I use this all the time when my boss deletes the wording/paragraph I know my bosses boss wants to see so when they ask for it I can just copy paste back into the current live version.
deafpolygon · 3 years ago
Yeah - I like this, to an extent - it works. You can get this on OneDrive or DropBox as well, but I don't want to do everything in Word.
frou_dh · 3 years ago
For general note-taking, I never want to have to bother with manually committing updates. The saving and syncing should be automatic. A separate general-purpose backup system running on the whole disk is good enough for the rare case of wanting to fish out a historical version of a note.
oldprogrammer2 · 3 years ago
Years ago I ran a custom script to add/commit/push on a folder once a day. So, nightly/automatically like a system backup, but in git.
deafpolygon · 3 years ago
> A separate general-purpose backup system running on the whole disk

Do you have a suggestion for Windows (11)?

I agree on your first point though.. which is what prompted my question.

Leftium · 3 years ago
https://simplenote.com/ automatically stores history for each note:

> Notes are backed up with every change, so you can see what you noted last week or last month.

I have used this feature, but only very rarely. It would be nice if SimpleNote could also search the note history, too.