Solid Git Examples

This interactive documentation introduces two options on how to use the version control system Git together with a Node Solid Server (NSS). The first does currently only work with this NSS fork. For now, you have to check out the feature branch "feature/git-backend". The second option works with a regular NSS.

Comparison

Option 1 Option 2
Speed 🐆 Fast

It implements the Git HTTP Transfer Protocol.

🦥 Slow

Every file system operation also invokes an HTTP Request.

Offline 👍 The Lightning Fs provides fast offline-first capabilities. 👎 The Minimal Solid FS does not support any offline capabilities.

We will evaluate both approaches in-depth as soon as possible. Besides, the Minimal Solid FS is enormously experimental, which leaves a lot of room for optimization.

Loading…

Option 1

This first option uses Isomorphic Git together with the Lightning Fs as a frontend setup. The backend is a NSS+node-git-http-backend, which also serves a git http backend.

Therefore the Request triggers the server to initialise a bare git repository (source code).

Once the repository exists, we can the changes (source code).

Option 2

In the second option, Isomorphic Git takes care of initialising the git directory structure. The command initialises a git repository with a working tree, instead of a bare directory as it is done in the first option (source code).

Since we read and write directly to the pod, we don't clone, and neither do we push the change explicitly. Instead, they are immediately written to our pod. Therefore, we can directly the changes (source code).