A gitway to hackmd

hackmd.io is great! I can share notes with people with very few clicks!

Some problems I have:

  • I start a note locally
  • I want to share it with someone, so I copy-paste it in Hackmd
  • The two notes grow out of sync 😕
  • I start a note with someone on hackmd
  • I'm in the train, I don't want hackmd
  • I don't know which modifications has been made since last time 😟
  • I want to cut a region of text, it closes hackmd 🤬
Both local notes and hackmd have their advantages, but I am bad at using them at the same time

Solution: A git-way to hackmd

In a nutshell: Use git locally, but when I push it pushes to hackmd, and when I pull, it pulls from hackmd.

Clone

custom Git server
hackmd server

Fetch/pull

Git client
custom Git server
Bare repo
Hmd repo
hackmd server

Push

Git client
custom Git server
Bare repo
Hmd repo
hackmd server

Push with conflicts

Git client
custom Git server
Bare repo
Hmd repo
hackmd server

Demo!

Limitations and further work

  • Hackmd API does not work to update notes
  • Support for comments, team notes, ...
  • Renaming, deleting files from various places, ...
You can try it now!

docker run -d --rm -v ~/git_md:/home/git -p 2222:22 panglesd/git_md