I wanted to have my blog in the git repo for my web site. The question is, which files to track, and which to ignore? As a general rule of thumb, track files you create and maintain, ignore those created at compile time. While I did this with git, it should work with any revision control system.
The blog is in a directory called (with great imagination) "blog". git does not track directories per se, so I added files, like so:
You don't need to track the subdirectories under blog/articles as nb will create them for you at run time.
I was perhaps more careful than I needed to be to avoid adding backup files (*~).
The first time you run nb update all in a new clone, nb will remind you to mkdir cache parts. git doesn't track empty directories, and I thought that making them once was less obnoxious than creating the directories and then creating and tracking a dummy empty file in each of them.
You should set git to ignore the following:
# nanoblogger goodies atom.xml rss.xml tidy.log blog/cache
Which I did in .gitignore, not in .git/info/exclude. Depending on how your repo is set up you may have to propagate those manually.
Once you have all this working, you can edit away with nb. Then when you are ready to check things in, run git status to see which files you have added and changed.
How many other blogware programs let you keep your blog in a revision control system (RCS)?