How to download a single commit-diff from GitHub?

后端 未结 2 428
忘掉有多难
忘掉有多难 2020-12-12 12:46

I would like to get a single commit (let\'s call it ${SHA}) from GitHub via the web-interface.

For example, something like:

$ git clone          


        
2条回答
  •  自闭症患者
    2020-12-12 12:57

    OK, found the answer myself.

    Adding .patch (or .diff) to the commit-URL will give a nice patch:

    https://github.com/foo/bar/commit/${SHA}.patch
    

    Thanks to Ten Things You Didn't Know Git And GitHub Could Do...

提交回复
热议问题