For github web browsing, it is not shown as side by side as lots of diff tool does. Can I change the diff mode to side by side? I mean on the github web.
You can with Octosplit Chrome extension. But you don't get the full length.
Github web does not have the feature yet.
You might be interested in term based diff tool cdiff, it has an option -s
to yield side-by-side diff.
To view changes not submitted yet, type
cdiff -s
To view change history in your workspace, type
cdiff -ls
To view changes from a pull request, pipe in the raw diff from the url, for example:
curl https://github.com/ymattw/cdiff/pull/11.diff | cdiff -s
Nope, not possible on GitHub at the moment. You can check out other on-line diff tools, such as: http://www.quickdiff.com/, http://www.diffchecker.com/ and http://www.diffnow.com/. These will give you side-by-side diffs, but you have to copy/paste text manually.
Yes, it is possible since Sept. 3rd 2014: see "Introducing split diffs":
Diffs now come in two flavors, unified and split.
Switch between them on pull request, commit, and compare pages using the toggle in the top right of the page. The mode you last used will become your preferred default.
Note: since Sept. 4th 2014, it also support word diff highlights.
See "Does Github have a view that shows diffs between file versions?".
Since 2014, and the introduction of dark theme(!) in 2020, the UI is now:
using:
Note: adding "&diff=split
" at the end of the URL will give you the same result: a split diff.
Not git diff
, but you can use git difftool
, which will call appropriate utility for your platform to do just what you are asking for.
For example, in Linux it will call meld
by default, which is very nice tool. git difftool
knows about quite a few diffing utilities, but you can also configure it to call your own.
Looks like it can do it as of version 1.7.9: https://raw.github.com/gitster/git/master/Documentation/RelNotes/1.7.9.txt