How to git clone a specific tag only without getting the whole repo?

Viewed 13679

I want to get linux kernel 2.6.22.19 source for cross compiling stuff for my router, but the repo is huge (3gb) if I do

git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git

and then check out that tag, the clone took forever, my bandwidth is limited.

if I run this

git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git --branch v2.6.22.19 --single-branch

the filesize recived is around 150mb, is this the correct way of doing it, what does this command likne mean ? v2.6.22.19 is a tag name right? why it can bed added after --branch ?

after cloning.

[oglop@localhost linux-stable]$ git status
# Not currently on any branch.
1 Answers
Related