Change github diff to be side by side comparison?

后端 未结 6 1668
醉酒成梦
醉酒成梦 2020-12-30 19:22

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.

6条回答
  •  醉酒成梦
    2020-12-30 20:04

    Yes, it is possible since Sept. 3rd 2014: see "Introducing split diffs":

    https://cloud.githubusercontent.com/assets/98681/4139311/699ef6da-3399-11e4-8d8e-cf0a9e902867.gif

    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:

    • from Unified:

    • To split diff:

    using:

    Note: adding "&diff=split" at the end of the URL will give you the same result: a split diff.

提交回复
热议问题