Idea: sharing via git

This is more of a start of an idea, but something I’ve been thinking about and wondering what others think?

Could we share directories via git? There are several use-cases I can think of:

  • Sharing notes with other people. Right now this is sort of possible, but you’d have to share your entire git repo. Being able to share a directory (via a separate git repo) would be great.
  • Alternative way of sharing Libraries without having to spin up a public instance of silverbullet or setting up a website. Just create a github repo.
  • Separating remote storage of notes - e.g. I could work on notes in a specific directory and have those notes get copied to the docs/ folder in a public github repo. Or I could store blog articles in a different directory and have those get saved to a git repo with a pipeline that publishes them automatically.
  • SB wouldn’t be required for someone else to view/edit notes

Some cons I can think of:

  • Slower than a traditional sync solution, so it wouldn’t be something like a multi-person live editing session
  • Auto-commits could generate a lot of noise, so it’d probably need to be able to handle branches so that changes could be optionally submitted via a PR that can be squashed
  • No idea how merges or conflicts would be handled, especially if not auto-commiting to the same branch. Somewhat alleviated if we assume only one writer and many readers.
  • Security concerns around space scripts/etc - it’d be a good idea to disable executing space scripts in these types of directories unless explicitly enabled

From a technical standpoint, maybe git submodules could be used for this purpose? I usually hate them, but also haven’t had a good reason to use them.

There is already both a git plug and a github plug. One of these could potentially be extended.