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

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

    I was in the same need. I need to download a patch of a specific commit which I need to apply onto another branch.

    I used: git format-patch sha-id

    Just specify the sha-id which is just older than the required commit. It will give .patch files corresponding to the all commits.

提交回复
热议问题