I\'ve recently started working on a project that uses git for storage and ruby as a front-end. The first version of my script used ruby-git, which was ok though pretty simpl
Since Git is well structured, Grit uses a method missing (Grit::Git#method_missing) to 'systematically' execute Git commands.
See link below for an example that should help you.
https://gist.github.com/731502