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

前端 未结 8 2203
北海茫月
北海茫月 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:28

    This would appear to be impossible. According to a discussion on kernel.org, the protocol will only allow named refs to be fetched. If you don't wish to download the snapshot from the git website, you'll have to clone the entire repo.

    (You may wish to read the manuals for git-fetch and git-ls-remote.)

提交回复
热议问题