Git, as a queryable database.
geschichte is version control whose objects, refs, worktree, and history live in
Datahike and
Konserve — so you can commit, branch,
and merge with Git semantics, query the whole repository with Datalog, and
replicate it over the replikativ stack. It reads
and writes real Git objects, packs, and the wire protocol without shelling out to
native Git, and the same repository can back a virtual filesystem, the ges
CLI, or Muschel's integrated git
command. Real Git that is also a queryable database is, to our knowledge, a
combination no other system provides — see Prior art.
It is a new implementation in the lineage of the original geschichte project, which became replikativ.
Beta. geschichte is usable but pre-1.0. On-disk and database formats may still change between releases; you may need to re-import or migrate repositories as it stabilises.
Part of the replikativ ecosystem for decentralized, queryable data.
org.replikativ/geschichte {:mvn/version "VERSION"} ; see the Clojars badge
From a local checkout, for development:
org.replikativ/geschichte {:local/root "../geschichte"}
(require '[datahike.api :as d]
'[geschichte.repo :as repo]
'[geschichte.query :as query])
(def cfg {:store {:backend :memory :id (random-uuid)}
:schema-flexibility :write
:keep-history? true
:commit-graph? true})
(d/create-database cfg)
(def conn (d/connect cfg))
(repo/init! conn {:name "demo"})
(repo/write! conn "README.md" (.getBytes "hello\n" "UTF-8"))
(repo/stage-all! conn)
(def initial (repo/commit! conn {:message "initial" :author "Ada"}))
(repo/status conn) ; Git-shaped status, as data
(query/commits @conn) ; commits as ordinary values
(d/q '[:find ?path
:where [?file :geschichte.work/path ?path]]
@conn) ; …or just ask Datalog
See Getting started and the Clojure API guide.
ges exposes Git-compatible commands at the top level and keeps
geschichte-specific inspection under its own namespaces:
ges init
ges status --short
ges add -A
ges commit -m initial
ges log --oneline
ges db query '[:find ?path :where [?e :geschichte.work/path ?path]]'
From a source checkout, replace ges with clojure -M:cli --
(e.g. clojure -M:cli -- status --short).
Tagged releases ship native ges archives for Linux amd64, macOS arm64, and
macOS amd64. See the CLI guide.
src/geschichte/
repo.cljc public repository API — init/write/stage/commit/status/log
workspace.cljc isolated Datahike worktree + index + ref catalog
fs.cljc versioned filesystem over the repository
content.cljc content-addressed blobs; logical IDs, physical is a choice
chunk.cljc content-defined chunking for binary content
diff.cljc line-vector Myers/bisect over text
merge/ three-way merge
query.cljc Datalog-shaped views (commits, refs, paths)
schema.cljc the Datahike schema the repository lives in
git/ Git interop — object, pack, pack-index, revision,
protocol_v2, receive_pack, http, ssh, transport,
command, compatibility
cli.clj the `ges` entrypoint (native-image target)
Deeper: Architecture (the two branch systems), Storage, and the Git compatibility contract.
clojure -M:test
clojure -M:format
clojure -M:cljs-test && node target/node-test.js
clojure -T:build jar
clojure -T:build native
clojure -T:build native-smoke
Babashka tasks remain as short aliases for these Clojure commands.
geschichte is licensed under the Apache License 2.0.
Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |