Git Primer
This primer will show in few steps how to initialize git storage and start using it. It literally takes only few commands to do so.
The default configuration created by tackler is already ready configured for git storage, you have to just add files to the repository.
Create a demo journal
Easiest way to create git based journal is using default configuration generated by tackler.
tackler new git-primer
tackler --config git-primer/conf/tackler.toml
This demo setup has following directory structure:
git-primer
├── conf
│ ├── tackler.toml
│ ├── accounts.toml
│ ├── commodities.toml
│ └── tags.toml
└── txns
├── price.db
├── welcome.txn
└── journal.txn
Initialiaze Git Repository
cd git-primer
git init .
git config user.name tackler
git config user.email "accounting@example.com"
After the basic repository setup is done, commit the content of journal to git.
git add .
git commit -m 'initial import of default data'
[main (root-commit) ee1ce411737fe3c] initial import of default data
7 files changed, 171 insertions(+)
create mode 100644 conf/accounts.toml
create mode 100644 conf/commodities.toml
create mode 100644 conf/tackler.toml
create mode 100644 conf/tags.toml
create mode 100644 txns/journal.txn
create mode 100644 txns/price.db
create mode 100644 txns/welcome.txn
Run Default Reports from Git
Now you can run defaults reports from git by using --input.storage git
CLI argument.
tackler --config git-primer/conf/tackler.toml --input.storage git
Git Storage
reference : main
directory : txns
extension : txn
commit : ee1ce411737fe3c58787449baf22608ba0332c89
author : tackler <accounting@example.com>
date : 2025-05-02 22:53:52 +0300
subject : initial import of default data
**********************************************************************************
Balance Report
--------------
...
You can make this permanent by changing kernel.input.storage
parameter in tackler.toml.
That’s it, now you can switch between filesystem and git based storage. This is especially handy in cases when you would like to run reports before committing data to the repository.
At the same time, you can switch back to pristine state in the repository, no matter what is the state of the edited files in the working copy.
Feel free to edit, remove and add journal files as you wish under txnx folder. Tackler will pick them automatically from there.
See Production Setup and Transaction Data Sharding ideas how to structure your journal data.