In looking for an answer I found SWISH: SWI-Prolog for Sharing which notes:
3.2 Source code and query management
As JSFiddle formed the initial inspiration for SWISH, SWISH has a facility to save the
program. The current version of SWISH explicitly targets the cooperative development
of Prolog programs and queries related to a dataset (see section 5.2). This triggered the
implementation of a more organised storage facility. The server-side storage module is
implemented in Prolog and inspired by GIT. Each file is versioned independently rather
than maintaining the version of a hierarchy of files. Files can be referenced by content
using their GIT compatible SHA1 hash or by name. The name can be considered a
version head and refers to the latest version with that name. The file save and load
interface provides the following operations:
– Saving a file anonymously, which produces a randomly generated URL similar to
– Saving a file by name.
– Saving a new version. The interface shows the available versions and the modifications.
– Forking a file under a new name. The history remains linked to the original.
Prolog source files can include other sources on the same server
using :- include(filename)., including the latest version or
:- include(hash). to include a specific version.
An example of where such a link would be placed.
Also a SWISH notebook