Using only git

As of Oct 2022, the hidos package is the easiest way to create and amend digital successions. Read getting started for instructions on using hidos. Alternatively one can create and amend digital successions using only git.

Creating a digital succession (and DSI)

To create a DSI (and digital succession), you create a signed initial commmit with an empty git tree:

git checkout --orphan foobar
git read-tree --empty
git commit -S --allow-empty --allow-empty-message -m ''

Display the Digital Succession Identifier (DSI)

With common Linux utilities, this will display the DSI of the foobar branch:

git rev-list --max-parents=0 foobar | xxd -r -p | basenc --base64url | tr -d '='

Regenerate a new DSI

You might not like a DSI that you create. Maybe you don't want 0 or O characters, or maybe you don't want l or I characters, because some fonts do not visually distinguish them. Or maybe you don't want - or _ characters. Whatever the reason, every second you can easily regenerate a new DSI doing the following steps.

git checkout --detach
git branch -D foobar
git checkout --orphan foobar
git commit -S --allow-empty --allow-empty-message -m ''

Amending a new edition

In the following example, the foobar branch is a branch recording a digital succession and the main branch contains a directory my_docs/review_of_reviews which is the digital object to become a new edition. Since this digital object is a git tree (directory), the git subcommand read-tree is used. The following will make a signed commit so that the digital object is edition 0.1 of the succession.

git checkout foobar
mkdir -p 0/1
git read-tree --prefix 0/1/object -u main:my_docs/review_of_reviews
git commit -S -m '0.1'