parsing git log output, preferably as xml

I want to parse the output from git log. My current tool does this for svn by parsing the —xml option that svn log has. I can’t seem to figure out how to output git log as xml. If xml is not an option, what is the best way to parse this output? I would really like to avoid parsing it as raw text, looking for “author” and “date” ect.


  • ssh key stops functioning after a while
  • git-svn clone fails unexpectedly
  • Similar Java access code (methods) of Git/JGit as SVNKit
  • Git: Seemingly Simple Branching Questions
  • Gitolite hook doesn't work
  • Connecting git to github on windows 7 without bash
  • Git .ignore not ignoring
  • How to see al the commit tree in git bash?
  • Can I work with Git command line if I've checked a project out using Eclipse's EGit?
  • Installed Git, but accidentally deleted a file. Now I'm lost
  • Unable to negotiate a key exchange method with Mina deployment
  • Efficient way to find out which branches and/or commits point to an object?
  • One Solution collect form web for “parsing git log output, preferably as xml”

    You could build your own simple xml output by using the formatting options.

    git log --pretty=format:"<entry><author>%an</author><commit_date>%cd</commit_date><message_body>%b</message_body></entry>"

    Just add whatever fields you want. (You’ll need to script a bit if you want proper xml header etc.)

    See man git-log PRETTY FORMATS section the list of fields you have access to.

    Git Baby is a git and github fan, let's start git clone.