When I save my hledger data files, I use Git, via Magit, for version control. My personal accounting data is too valuable to trust to simply overwriting the same file repeatedly, which is how I used to save my plain text data.
Using Git/Magit has worked well, except for one thing that I noticed. Every time I made a commit, I needed to supply a title. Usually, the only title I could think of was something like “added last 2 days of transactions.” Such a title is almost meaningless if all my titles were to say the same thing.
So, I decided just to add just the date of the commit as the tile. For example, “February 5, 2026.” Better than “added last 2 days…”, but it dawned on me that almost surely Git is recording the date of the commit, making my title superfluous.
What if I didn’t put any title? Nope, Git wouldn’t accept a commit without a title, at least in the way I was using Magit.
I asked my Emacs mentor Protesilaos Stavrou (aka Prot) about this, and he pointed me to the command vc-auto-commit, which makes the commit without my having to enter a title. He also helped me set up the command so that it would affect only my hledger data files. Previously, I had set up Magit to track all the files in a certain folder, but I really only wanted to track my hledger data files. Now when I add a new non-hledger file to the folder, Magit is no longer asking me what I want to do with that file.
The result is that the vc-auto-commit command eliminates the steps of going to the Magit buffer, staging my file, committing it, and supplying a title. Another win in terms of getting a task done with less effort.