I've longed for an implementation of sdiff for Git, but in the meantime I have something that works great on OS X. It requires FileMerge, part of the developer tools from Apple. Hat tip to my friend Dale.
This works when:
The command is:
git difftool -t opendiff $(git log --pretty=format:%H -1 master -- $1) $(git log --pretty=format:%H -1 HEAD -- $1) -- $1
(I'm using subshell calls to get the SHAs of the file for the branch and master; a simplified look at the command is:
git difftool -t opendiff SHA-master SHA-branch -- path/to/file.py).
I put this in a shell script and call it with the relative path to the file. Git is picky about that relative path; it should be relative to the current directory your shell is in, and a directory that is in the repository.
Assume you named the script my-sdiff. Example:
You'll be prompted at the shell with something like:
Launch 'opendiff' [Y/n]:
Just hit RETURN and FileMerge should open, showing you a side-by-side comparison of the file.
Vexingly, if you get the relative path wrong, nothing happens! If you don't get the Y/n prompt you probably have the relative path wrong.