GitTheSource

Revision 6 as of 2010-06-21 08:34:44

Clear message

Obtaining the kernel sources for an Ubuntu release using git

All of the Ubuntu Kernel source is maintained under git. The source for each release is maintained in its own git repository on kernel.ubuntu.com. These can be browsed in gitweb, the official Ubuntu trees are in the ubuntu/ directory. To obtain a local copy you can simply git clone the repository for the release you are interested in as below. The git command is part of the git-core package:

  • git clone git://kernel.ubuntu.com/ubuntu/ubuntu-<release>.git

For example to obtain the maverick tree:

  • git clone git://kernel.ubuntu.com/ubuntu/ubuntu-maverick.git

This will download some 300MB of data. If you have a virgin Linus tree locally you can significantly reduce the size of this download through object sharing. Note that once these two trees are tied together you cannot remove the virgin Linus tree without damage to the Ubuntu tree:

  • git clone --reference linux-2.6 git://kernel.ubuntu.com/ubuntu/ubuntu-maverick.git