Is it a bad idea to create a Git commit for every change to a wiki?

Hi all.

I have been experimenting with using Git to keep a history of every change that I make to my single-file wiki. I have a program monitoring the file which runs the following script whenever the file changes:

cd C:\files\wiki\wiki.html
git add .
git commit -am "Autobackup %date% %time%"

I like the idea of being able to jump back and experiment with earlier versions of my wiki. I also like being able to undo recent changes when I make an error.

But I don’t really know much about Git, and I’m concerned that I might be misusing it.

Is there a reason that this is a terrible idea? Perhaps there is a more sensible approach I could adopt?

Thanks for your help!

I use the git saver in TW and it auto saves every time I leave edit mode of a tiddler. So it’s a lot of commits. But then you never know which one you will need till you need it!

1 Like

I think it’s OK. Since git only saves the differences between your commits, it shouldn’t be a problem with the size or performance of the repository.

The only thing, that I would do, would be to add some “manual commits” from time to time. Eg: When you did some refactoring. … Those “manual” commits will be easier to find, if you need them later on.

Repo size can only become a problem, if you would use an encrypted wiki.

1 Like

Thank you both for your help :slight_smile:

The only thing, that I would do, would be to add some “manual commits” from time to time. Eg: When you did some refactoring. … Those “manual” commits will be easier to find, if you need them later on.

Yes for sure I will do this, thanks for the advice.