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.org/pub/scm/linux/kernel/git/davem/net-2.6.git
and the commit hash:
ee9c5cfad29c8a13199962614b9b16f1c4137ac9
How can I download just this commit using git (I don’t want the whole repo, just the one commit patch)? I have read the man pages for git-pull and git-cherry-pick and fiddled with the commands with no luck.
Cloning the repo really isn’t an option because some of the Kernel repositories are exceedingly large and slow to download (hours).
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.)