Two-column web-based git difftool
JavaScript Python HTML CSS Shell
Latest commit 00ee1bb Nov 7, 2016 @danvk committed on GitHub Merge pull request #114 from NikolasOliveira/clean-exit
Exit cleanly from 'git webdiff'
Failed to load latest commit information.
testdata Only use side-by-side for one-sided image diffs (fixes #56) Nov 10, 2014
tests Fix JS test Apr 20, 2015
webdiff Exit cleanly from 'git webdiff' Nov 5, 2016
.gitignore ignore wheelhouse Nov 7, 2014
.travis.yml Use container-based architecture on Travis-CI Mar 27, 2015
Gruntfile.js Fix JS tests & add Travis config Nov 17, 2014
LICENSE Initial commit Jun 26, 2014 restructure; everything under webdiff/ Jul 1, 2014
README Split off CHANGELOG Jun 24, 2015 Update to reflect user.token Mar 17, 2016
TODO Works on relative directory paths Jul 6, 2014
bower.json Bump highlight.js version Mar 17, 2016
requirements.txt Add requests to requirements.txt Mar 17, 2016 Bump version and add a --version flag Mar 31, 2016 Showing code diffs Sep 15, 2014
testing.cfg Kill frame -- no need for it anymore. Nov 11, 2014

Build Status git webdiff

Two-column web-based git difftool.

Features include:

  • Side-by-side (two column) diff view
  • Runs in the browser of your choice on any platform.
  • Syntax highlighting via highlight.js
  • Step back and forth through multiple files in a single diff
  • Rich support for image diffs

Screenshot of webdiff in action

Screenshot of image diffs


pip install webdiff


Instead of running "git diff", run:

git webdiff

You can also start webdiff via:

git webdiff [args]

You can pass all the same arguments that you would to git diff, e.g. 1234..5678 or HEAD.

webdiff can also be invoked directly to diff two directories or files:

webdiff <left_dir> <right_dir>
webdiff <left_file> <right_file>

You can also use webdiff to view GitHub pull requests:

webdiff #123  # if you're in a git repo with a github remote

This will download the files relevant to the Pull Request and run webdiff.

If you run into GitHub API quota limits or you'd like to use webdiff with private repos, you can set your credentials in a .githubrc file:

user.login: yourusername
user.token: your-personal-access-tokens

Make sure you chmod this file to only be readable by yourself. You can generate a personal access token for webdiff via → profile → Settings → Personal access tokens. Make sure to grant all the "repo" privileges.


(from an activated virtualenv)

pip install -r requirements.txt
bower install
./webdiff/ testdata/dygraphsjs/{left,right}

or to launch in debug mode:

./ $(pwd)/../testdata/webdiffdiff/{left,right}

(or any other directory in testdata)

To run the Python tests:


To run the JavaScript tests:

python -m SimpleHTTPServer
open tests/runner.html

To iterate on the PyPI package, run:

# from outside the webdiff virtualenv:
pip uninstall webdiff

# from inside the webdiff virtualenv, adjust for current version
python sdist
mkdir /tmp/webdiff-test
cp dist/webdiff-X.Y.Z.tar.gz /tmp/webdiff-test

cd /tmp/webdiff-test
pip install webdiff-X.Y.Z.tar.gz