How do I download a specific git commit from a repository?

前端 未结 8 2353
北海茫月
北海茫月 2020-12-15 06:10

I don\'t have a local code copy/etc, I just want to download a single specific git commit so I can view it. I have the url for the git repository:

git://git.kernel.o

8条回答
  •  庸人自扰
    2020-12-15 06:23

    In this case, if all you want is the diff, you can download it from the web frontend for the kernel repo at this url:

    http://git.kernel.org/?p=linux/kernel/git/davem/net-2.6.git;a=commitdiff_plain;h=ee9c5cfad29c8a13199962614b9b16f1c4137ac9
    

    You can play with the url to get other commits.

提交回复
热议问题