Below are direct quotes from nbdime's documentation page, as it eloquently states the problem and how it solves it.
Jupyter notebooks are useful, rich media documents stored in a plain text JSON format. This format is relatively easy to parse. However, primitive line-based diff and merge tools do not handle well the logical structure of notebook documents. These tools yield diffs like this:
nbdime, on the other hand, provides “content-aware” diffing and merging of Jupyter notebooks. It understands the structure of notebook documents. Therefore, it can make intelligent decisions when diffing and merging notebooks, such as:
nbdime yields diffs like this:
Here are my own words on the problem:
Jupyter Notebook is an extremely popular file format on Github; as of the time of writing, there are several millions of them hosted on Github. However, the generic diff tool used by Github when doing version control is not very effective, as seen above.
Github has done a great job to display Jupyter Notebook in rendered form instead of its source code when viewed in repository online. Could it do it one more time and use nbdime as the default option of file comparison instead of diff? It would make the life of developers much easier when collaborating on Jupyter Notebook.