Git trick: Colored Web Page with Changes Highlighted

With git, you can create a web page with changed words highlighted. Red==removed, green==added.
When you have found a colleague, friend or a supervisor who can provide useful feedback, great!
When you make the changes and ask for more feedback, you don’t want to make your friend read the 50 pages again. And not everyone uses git (yet). Just create an HTML page with changes highlighted.

Find the Revision You Like

$ git log

or

 $ git whatchanged

Notice the revision number.

Show the Differences

$ git diff --unified=999999 --color-words 7b73574c67401e2fe603c35a7656bd1acf2af00d terosdoc.md

Save as Colored HTML

$ git diff --unified=999999 --color-words 7b73574c67401e2fe603c35a7656bd1acf2af00d terosdoc.md|ansi2html >diff.html

Now you have an HTML document to send to your friend, with changes highlighted.

Posted in Uncategorized | Tagged , , , , , , | Comments Off on Git trick: Colored Web Page with Changes Highlighted

Comments are closed.