Skip to content
A stupid little script to automatically commit edits to blog posts. More detail here:
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

autoblogit ("Auto-blog-git")

A stupid little script to automatically commit edits to blog posts, or just about anything else, as a form of shotgun version control.

More detail can be found in the blog post that spawned the script.

Feel free to fork it; it's inelegant and applies no useful description to each commit. I also welcome emails telling me how idiotic and crappy my script is.

How to Use It

  1. cd ~/Documents/Blog
  2. git clone
  3. cd autoblogit
  4. mv .abg-commit-prep.sed .abg-commit.log .gitignore ~/Documents/Blog
  5. cd ~/Documents/Blog
  6. rmdir autoblogit
  7. chmod 700
  8. Set up cron or launchd to run the script periodically.
  9. Pray.


  • The script assumes your blog posts (or whatever else you want to track) are kept in ~/Documents/Blog. Change that if the files live somewhere else.
  • It's less tidy than it could be, but in the above setup I've moved the script and all of its files into your blog's directory. This is just to keep things simple. In a later revision I might tidy that up.
  • The description is now somewhat useful, though far from ideal. It parses the output of git status using tr (twice), then sed to create an ugly-but-descriptive commit message. It's still far from ideal, but it does at least mean your commit log contains decipherable commit messages.
  • If you're running Max OS X, which has deprecated cron in favour of launchd, I recommend (and use myself) Peter Borg's excellent Lingon app. It makes setting up scheduled launchd events much easier.
  • I accept no responsibility if this causes your system to eat itself.
Something went wrong with that request. Please try again.