I have written some scripts for code analysis needs via git/grep/awk/ruby. code metrics, top committers, frequently committed files, duplications etc<p>you can find some interesting question with solutions
<a href="http://stackoverflow.com/questions/tagged/git?sort=votes&pagesize=30" rel="nofollow">http://stackoverflow.com/questions/tagged/git?sort=votes&...</a><p>if you need low level access <a href="https://github.com/mojombo/grit" rel="nofollow">https://github.com/mojombo/grit</a><p>could you elaborate, what your expectations are, I can give pointers or share some of my code