Windows (PowerShell):irm https://textonly.github.io/git-prime/install.ps1 | iex
Usage
$ git prime-commit "Fix critical bug"
Searching for prime commit hash...
Base message: Fix critical bug
Attempt 10: d051b974ece9d844... not prime
Attempt 20: 954de912a9e5bbce... not prime
Attempt 30: ace4df509c5a9677... not prime
...
Attempt 168: cb80ebbd975f0028... not prime
[PRIME] Found after 168 attempts!
Commit: cb80ebbd975f00288dca70d8fa735c688755f947
Hash as int: 1161800157764419353674868058637793188631547345223 → Verify on WolframAlpha
Message: "Fix critical bug" + git-prime Nonce: 167
How it works
SHA-1 hashes are 160 bits (40 hex characters)
When interpreted as integers, they range from 0 to ~1048
Miller-Rabin primality test checks if the hash is prime
Appends nonces (git-prime Nonce: N) to your message until a prime hash is found
Average runtime: 30-120 seconds
Features
Mathematically sound: 40-round Miller-Rabin test
Git integration: Works as a git subcommand
Cross-platform: Python 3.6+, any OS
Zero dependencies: Pure Python stdlib
Why?
Because hunting for prime commit hashes is more fun than arguing about
commit message conventions.
But also: shouldn't the global distributed compute grid be used to
forward number theoretic random non-goals like primality?
Every developer running git prime-commit contributes cycles to
the noble pursuit of finding 160-bit primes hidden in SHA-1 space.
It's distributed computing for mathematically pointless but aesthetically
satisfying goals.