Why Laws Should Be Using Git
Here’s why the current new-doc-everything approach for law amendments is not the most ideal system, in 2025.
Disclaimer: I’m not a lawyer, just a programmer.
Laws often have amendments, and the number of published docs a reader must refer to is ever-increasing.
For example, a business law that took effect decades ago could be followed by many amendments throughout the years each adding to the pile of publications.
If a person wants to start a business and can’t yet afford a lawyer, they’d have to sift through each related publication and piece the complete picture in their head. This is the same for most instances where people want to find anything related to the law governing them.
Assume a world where laws had a version control system. Files would be created for categories (such as business-law.md). This single file is amended using Git (instead of adding a new file) when a new amendment is needed. The file contains the most up-to-date and accurate law that’s in practice. So a person referencing the law just looks at the repo (or other user-friendly front-ends that mirror this).
If the files are in Markdown, it should be very easy to create tools like PDF exporters (with time tags), websites that fetch the repo to provide a nicer UI, change trackers, and more. Another standardized JSON or file format can work, too, if we want to have features like sub-section linking, a popup explainer for the meaning of terms, change notification systems, and many other possibilities.
Cryptography tools like GPG keys can be used to verify the Git commit signers. The keys could be stored at existing authority in the government which has the power to change the laws. Once published to the agreed-upon main branch, it will be the law, and all tools will start referring to it. The repo can be hosted on the authority’s servers as long as there’s a git remote endpoint with public read access.
At the end of the day, these laws are published for the people. So it’s better for everyone if we all understand them better and quicker.