Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Github style split diffs on a command-line

Github introduced split diffs in September. Is there any way to see that on a command-line?

like image 849
Sanghyun Lee Avatar asked Dec 08 '14 02:12

Sanghyun Lee


1 Answers

A typical command line is usually not wide enough to handle this kind of comparison. Note that most of Git is built for 80 character wide terminals. So you would have about ~35 characters per side; I doubt that’s helpful (I already have problems reading unified diffs on a much wider terminal).

Git however gives you the ability to use diff tools, external programs that can do whatever diff you prefer. For example, you could use something like WinMerge on Windows, which uses a split view by default. There are many other programs for it, for every platform, and usually every diff program can be set up to work with Git.

like image 188
poke Avatar answered Sep 28 '22 07:09

poke