VCS · pijul.org · DISTRIBUTED · CORRECT · OPEN SOURCE

pijul

A distributed version control system built on a mathematically sound theory of patches — fast, composable, and correct by construction.

why pijul
commutation

Independent changes can be applied in any order without changing the result or the version identifier. No more git rebase ceremony.

Feature branches are often just changes in Pijul. Keeping history clean is the default.

merge correctness

Strong guarantees on merges. The order between lines is always preserved, unlike 3-way merge which can silently shuffle content.

When order is genuinely unknown, Pijul surfaces a conflict — never silently wrong output.

first-class conflicts

Once resolved, conflict resolutions applies to the same two changes everywhere. Conflicts never come back.

Conflicts are not a failure to merge in Pijul, they happen between two changes and are resolved by one change. Just like everything else.

partial clones

Commutation makes it possible to clone only a subset of a repository. Working on a partial clone produces changes that merge cleanly into the full repo.

Ideal for monorepos: work on just the parts you care about.

get started
bootstrap — pijul is developed with pijul

quick install

$ cargo install pijul --version "~1.0.0-beta"

clone source

$ pijul clone https://nest.pijul.com/pijul/pijul
more install options →

repository

nest.pijul.com/pijul/pijul

Hosted on the Nest — Pijul's own repository hosting platform.

free hosting ↗
see it in action
git
git $ printf 'A\nB\n' > f.txt
git $ git add f.txt
git $ git commit -m 'base'
[main (root-commit) 46fcdd3] base
 1 file changed, 2 insertions(+)
 create mode 100644 f.txt
git $ git checkout -b alice
Switched to a new branch 'alice'
git $ printf 'G\nA\nB\n' > f.txt
git $ git commit -am 'add G at top'
[alice abfb5f1] add G at top
 1 file changed, 1 insertion(+)
git $ cat f.txt
G
A
B
git $ printf 'A\nB\nG\nA\nB\n' > f.txt
git $ git commit -am 'add A,B at top'
[alice 77d3d8d] add A,B at top
 1 file changed, 2 insertions(+)
git $ cat f.txt
A
B
G
A
B
git $ git checkout main
Switched to branch 'main'
git $ git checkout -b bob
Switched to a new branch 'bob'
git $ printf 'A\nX\nB\n' > f.txt
git $ git commit -am 'insert X between originals'
[bob 09b6f67] insert X between originals
 1 file changed, 1 insertion(+)
git $ git checkout main
Switched to branch 'main'
git $ git merge alice
Updating 46fcdd3..77d3d8d
Fast-forward
 f.txt | 3 +++
 1 file changed, 3 insertions(+)
git $ git merge bob
Auto-merging f.txt
Merge made by the 'ort' strategy.
 f.txt | 1 +
 1 file changed, 1 insertion(+)
git $ cat f.txt
A
X
B
G
A
B
# X landed between Alice's new lines, not the originals. No conflict, no warning.
pijul
pijul $ pijul init
Repository created at /tmp/nix-shell-1298810-1981740624/tmp.F9gcxNycmD/pijul
pijul $ printf 'A\nB\n' > f.txt
pijul $ pijul add f.txt
Tracked 1 path(s)
pijul $ pijul record -am 'base'
Hash: 3WW3T5GBOOR3OCU2IDEVHHA7GGXMOHJDOYHCH7L5BWUGHUBHHQIQC
pijul $ pijul fork alice
pijul $ pijul channel switch alice
Reset given paths to last recorded change
pijul $ printf 'G\nA\nB\n' > f.txt
pijul $ pijul record -am 'add G at top'
Hash: GBO3OSMXODHKWDCJRYG3SFVKZH6LZLHJY7L7VUPDQKXO2266P3EQC
pijul $ cat f.txt
G
A
B
pijul $ printf 'A\nB\nG\nA\nB\n' > f.txt
pijul $ pijul record -am 'add A,B at top'
Hash: 6CIUP2TSLW6IXCX7G4RZR3WHY5SEM5BIU7U4LJX6TLOPY3XUYSOQC
pijul $ cat f.txt
A
B
G
A
B
pijul $ pijul channel switch main
Reset given paths to last recorded change
pijul $ pijul fork bob
pijul $ pijul channel switch bob
Reset given paths to last recorded change
pijul $ printf 'A\nX\nB\n' > f.txt
pijul $ pijul record -am 'insert X between originals'
Hash: F5CAUHH7IA2QMSRPNMX7LDQLCMKJKKKEGGACTZ7OXTSHYPDE3WFAC
pijul $ pijul channel switch main
Reset given paths to last recorded change
pijul $ pijul fork merged
pijul $ pijul channel switch merged
Reset given paths to last recorded change
pijul $ pijul pull --all . --from-channel alice
pijul $ pijul pull --all . --from-channel bob
pijul $ cat f.txt
A
B
G
A
X
B
# X is between the original A and B. Pijul knew which lines were Alice's new ones.