Keeping Your Personal Finances in Git: The Act of treating personal finance as source code
Ishe Chinyoka
- 4 minutes readTable of Contents
In this post, I wrote about why I fell in love with plain text accounting. Today I want to talk about the next step.
If your financial records are plain text, why not manage them the same way you manage your source code, your writing, and your configuration files?
That simple question led me to put my finances under version control.
I have never regretted it.
Your Financial History Is Source Code
One of the biggest ideas in software development is that every change should have a history.
Git remembers who changed a file.
When it changed.
What changed.
And, perhaps most importantly, why it changed.
Those same questions apply surprisingly well to personal finances.
Why did this balance change?
When was this expense recorded?
Was this transaction corrected later?
Instead of relying on memory, Git provides the answers.
One Journal, Many Years
People often assume that accounting software stores information inside a large database.
Plain text accounting doesn’t have to.
A single journal file can comfortably hold an entire year’s worth of transactions, and often much more.
My own setup is slightly different.
Rather than keeping everything in one enormous file, I keep a dedicated .finance/journal directory under Git version control.
Within that directory are several journal files, each representing part of my financial life. Hledger’s HLEDGER_FILE environment variable points directly to this location, so every report automatically uses the correct journals.
Instead of one massive file, I have a small collection of journals that are easier to organize, browse, and maintain.
Git tracks every one of them.
Every Commit Tells a Story
One unexpected benefit of using Git is that your commit history becomes a financial diary.
A commit might represent:
- Recording this month’s salary
- Reconciling a bank statement
- Correcting a misplaced expense
- Adding investment transactions
- Closing the books for the month
Months later, you can revisit exactly what happened.
There is no mystery.
Every change has context.
Mistakes Are No Longer Scary
Anyone who keeps financial records eventually makes mistakes.
Perhaps an amount was entered incorrectly.
Perhaps an expense was assigned to the wrong category.
Perhaps a transaction was duplicated.
Without version control, corrections can sometimes leave you wondering what the original record looked like.
Git removes that uncertainty.
You can compare versions, inspect individual changes, or even recover an earlier state if something goes wrong.
That safety net encourages confidence rather than caution.
Backups Become Automatic
One of Git’s greatest strengths is that backups naturally become part of your workflow.
Every time changes are pushed to a remote repository, another copy of your financial history exists.
Whether that remote lives on your own server, a private Git hosting service, or another trusted location, your records are no longer confined to a single computer.
Of course, because financial data is sensitive, private repositories and encrypted backups are usually the right choice.
The important point is not where the backup lives.
The important point is that creating it becomes part of your everyday workflow instead of an occasional chore.
Plain Text Encourages Better Habits
Because the journal consists of ordinary text files, all the familiar Unix tools suddenly become useful.
Need to find every electricity payment?
Search the journal.
Need to locate every transaction involving a particular account?
Use grep.
Need to summarize information before importing it elsewhere?
Reach for awk, sed, or your favourite scripting language.
Your accounting data is no longer locked inside an application.
It becomes data you own.
More Than Accounting
When I first started using Git, I thought it was simply a programmer’s tool.
Over time I discovered it was really a history management tool.
It works equally well for writing.
For documentation.
For configuration files.
And now, for financial records.
That realization has changed the way I think about personal finance.
I am not merely keeping accounts.
I am maintaining a reproducible financial record.
Every transaction is recorded as plain text.
Every correction is preserved.
Every report can be regenerated.
Every change has a history.
The Textsmith’s View
The more I explore plain text, the more I notice the same pattern appearing in different places.
Configuration files made my computer reproducible.
Git made my work reproducible.
Markdown made my documents portable.
Plain text accounting made my finances transparent.
Putting those journals under Git completed the picture.
A reproducible computer is useful.
A reproducible financial record is just as valuable.
Both begin with the same deceptively simple idea:
Write the truth down in plain text, and let good tools do the rest.