I kept thinking abut how nice it would be to manage song versions in git. Tracking the binary xrns file had a few problems. Every commit meant a complete copy of the xrns file, even if all I changed was track headings. Most changes are likely to occur in Song.xml but you would not be able to see what they were.
The better way would be to track the expanded xrns file. This would mean unzipping the xrns and adding each file to the git repo. Any time you changed the song you would need to unzip it to get the files.
If you changed branches or rolled back to an earlier commit you would need to rezip the files back into an xrns file.
This all seemed tedious and error prone. But, conceptually, it's not too bad.
So I wrote a Ruby program to manage this.
Big warning: I, of course, want this to work, and protect my files, and not screw up anything, but I'm far from knowing that I've shaken out all the bugs and managed all the edge cases. It's very much at the "Works for me" stage.
The code is a wrapper around command-line calls to 7z and git. You must have those two programs installed.
There is probably some stuff that assumes some things that might only be true for the specific versions of 7z and git I happen to be running.
I want this to work on Ubuntu, Windows, and OSX, but so far have only been hacking around on Ubuntu.
The current code grew out of some proof-of-concept scripts; there are no unit tests here. (I do have a test script I've been running for me to do some quick pass/fail executions, but that's not part of the repo.)
Get the code here: https://github.com/Neurogami/rnsgit
The repo README has more detail on usage.