Git-diff to HTML
问题 I'm looking for a way to produce HTML files from a git-diff output, preferably using python. I've been looking at http://docs.python.org/library/difflib.html without being able to figure out how to use the git-diff output as an input. Any clue? Many thanks 回答1: You could use the pygments commandline script to get a syntax highligthed HTML output. Installation: $ easy_install Pygments Example: $ git diff HEAD^1 > last.diff $ pygmentize -f html -O full,style=trac -l diff -o last.diff.html last