Answering my own question. Maybe this will help someone as I haven't found any other answer on the web about this error.
The error occured when my laptop hard drive was almost full, at approx. 95%. When I restarted the laptop, Windows started a registry repair and moved a set of missing files back into the right directory. I them emptied the laptop hard drive down to 70% full. After this, I could run the commit as expected.
I don't know if the lack of space on the hard drive or an registry error caused the issue but it coincided. So, as advice, if you get this error, make sure to:
- have sufficient space on your hard drive to write to.
- check if you need to run a registry repair.