How can I generate a diff for a single file between two branches in github

前端 未结 5 1785
有刺的猬
有刺的猬 2021-01-30 00:30

I need to generate a diff for a single file that will show the differences between two versions, which are actually tags in github. I then want to send this diff to someone via

5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-30 01:22

    Since this still isn't possible here's a browser-based diff-tool method. It does not leverage automation but only requires the ability to install Chrome extensions:

    1. Install Diff Tools for Chrome browsers: https://chrome.google.com/webstore/detail/diff-tools-text-pdf-doc-o/lkcdojpmjehlniamnglpjlldkoonlomb
    2. Open Diff Tools ( http://iblogbox.com/devtools/diff/ )
    3. From GitHub go to the BEFORE commit, tag, or branch, open the file, then click on the Raw button to get the raw file view, select-all and copy, then put in the left-hand side text box in Diff Tools
    4. Repeat step 3 but for the AFTER file and paste into the right-hand-side box in Diff Tools
    5. Click Compare Now and perform your diff ad-hoc

提交回复
热议问题