login
Header Space

 
 

Linux: Git Kernel Hacker's Guide

September 29, 2005 - 9:47am
Submitted by Jeremy on September 29, 2005 - 9:47am.
Linux news

The git directory content manager used to manage the Linux kernel source tree [story] continues to develop at a rapid pace [story]. Keeping up with the latest changes, Jeff Garzik released an updated version of his Kernel Hacker's Guide To Git. He explains, "several changes in git-core have made working with git a lot easier, so be sure to re-familiarize yourself with the development process."

Jeff's short guide is broken into four major sections, 'getting started' which talks about installing the software and getting a copy of the linux kernel source tree, 'basic tasks' which offers examples of keeping up to date with the latest code and merging in your own changes, 'branches' offering examples of creating, using and merging branches, and 'miscellaneous debris' which mentions applying patches from an mbox file and syncronizing tags. Further documentation on the various git commands can be found in the git man pages.


From: Jeff Garzik [email blocked]
To: Linux Kernel [email blocked]
Subject: [howto] Kernel hacker's guide to git, updated
Date:	Thu, 29 Sep 2005 07:03:05 -0400


Just updated my KHGtG to include the latest goodies available in 
git-core, the Linux kernel standard SCM tool:

	http://linux.yyz.us/git-howto.html

Several changes in git-core have made working with git a lot easier, so 
be sure to re-familiarize yourself with the development process.

Comments, corrections, and notes of omission welcome.  This document 
mainly reflects my typical day-to-day git activities, and may not be 
very applicable outside of kernel work.

	Jeff

updated?

September 29, 2005 - 12:09pm
Anonymous (not verified)

Still looks pretty old (I only looked at "Getting started"). It points
at Linus' git repo to get the latest version of git, but Linus handed
ownership to Junio Hamano a couple of months ago. The official GIT repo
is at

www.kernel.org/pub/scm/git/git.git.

There is now a clone command in git, so once you have a recent version
of git built, you can get started with the latest Linux kernel tree with:

$ git clone rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/git.git

You don't need to use "ls .git/refs/heads" to see what branches you have, just use:

$ git branch

... and so on. Which all goes to show that git is still a fast moving target, and that documentation for it is not really keeping pace.

What Jeff has done is good ... he's part of the solution, not part of the problem ... we just need more people to contribute good documents (or failing that, to point out the gaps in the existing documents ... Linus has said on the git mailing list that he's not good at writing documents, but he is good at describing how to solve specific problems).

Getting started

September 30, 2005 - 9:40am

I'd like to get started with git, but I'm not really eager to download the whole kernel tree, when a major part of it already is on my system. Say, is it possible to cheat a bit here?

If I have a somewhat recent kernel tarball, like linux-2.6.13.tar.bz2, can I extract it and do some simple rsync, saving me some hundred megabytes of download?

"Hundreds of megabytes" is so

September 30, 2005 - 12:44pm
Anonymous (not verified)

"Hundreds of megabytes" is something of an exaggeration. Linus' GIT tree on kernel.org is currently 127MB. This number goes up and down: up as more objects are added when Linus' checks in and merges more changes, and down when he "packs" the tree ... which happens about once a month.

If you unpacked your 2.6.13 tarball, and checked that into GIT, it would give you some local copies of objects ... but right now that wouldn't help your download as all the 2.6.13 and prior objects in Linus' tree have already be squeezed into a packed file ... so you'll have to get that packfile (which is 78MB of the total).

Update: Linus just packed af

September 30, 2005 - 8:08pm
Anonymous (not verified)

Update: Linus just packed after making the 2.6.14-rc3 release, so the GIT download size is currently at a localized low-point ... ~95MB for the two packfiles and accompanying index files.

Now is as good as it will get!

Ah! Very nice, I just figured

October 2, 2005 - 10:02am

Ah! Very nice, I just figured it out. I see the packfiles are within the .git tree, and get extracted with "git checkout". Thanks!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
speck-geostationary