Zettelkasten notes in GitHub

I started looking into the Zettelkasten method of note taking recently. There are many ways to go about accomplishing it digitally, but I wanted something simple and straight forward. Ideally, it would be in a format that is as universal as possible, without lock in to some type of proprietary client. I wanted to be able to easily sync across devices, and access the notes via Linux terminal.

After reading into some options, I settled upon using GitHub as my notes repo. Inspiration for this method came from rwxrob. There are already tools available to do this in Linux, but I felt like I wanted to keep it simple and create my own to accomplish only what I needed. I wrote a quick shell script to copy a template file into my local git repo and begin editing in vim. Instead of generating some complex UID, I just generate a unique filename using date +"%Y%m%d%H%M%S".md. The only limitation here is that I’ll only have 1 unique name every second - something which obviously won’t be a problem.

The Markdown format is perfect for creating the notes because it is mostly universal and should have great longevity. Even if Markdown somehow dissappeared in the future, it’s still mostly just plain text and easily readable.

Another great thing about storing the notes in GitHub is the ability to easily search the notes using git grep <pattern>. Even the file names are irrelevent in this case, because I can easily search the entire repo and find exactly where a term or tag is used. It even supports regex using git grep -e "<regex>".

The more I get into using GitHub, the more interesting uses I find for it.