2005-04-28 08:59:58

by Pavel Machek

[permalink] [raw]
Subject: kernel hacker's git howto

Hi!

Here's my current version of git HOWTO. I'd like your comments...

Kernel hacker's guide to git
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2005 Pavel Machek <[email protected]>

You can get cogito at http://www.kernel.org/pub/software/scm/cogito/
. Compile it, and place it somewhere in $PATH. Then you can get kernel
by running

mkdir clean-cg; cd clean-cg
cg-init rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git

... Do cg-update origin to pickup latest changes from Linus. You can
do cg-diff to see what changes you done in your local tree. cg-cancel
will kill any such changes, and cg-commit will make them permanent.

To get diff between your working tree and "next tree up", do cg-diff
-r origin: . If you want to get the same diff but separated
patch-by-patch, do cg-mkpatch origin: . If you want to pull changes
from the "up" tree to your working tree, do cg-pull origin followed by
cg-merge origin.


How to set up your trees so that you can cooperate with linus
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

What I did:

Created clean-cg. Initialized straight from Linus (as above). Then I
created "nice" tree, good for Linus to pull from

mkdir /data/l/linux-good; cd /data/l/linux-good
cg-init /data/l/clean-cg

and then my working tree, based on linux-good

mkdir /data/l/linux-cg; cd /data/l/linux-cg
cg-init /data/l/linux-good

. I do my work in linux-cg. If someone sends me nice patch I should
pass up, I apply it to linux-good with nice message and do

cd /data/l/linux-cg; cg-pull origin; cg-merge origin

--
Boycott Kodak -- for their patent abuse against Java.


2005-04-28 09:18:53

by Petr Baudis

[permalink] [raw]
Subject: Re: kernel hacker's git howto

Dear diary, on Thu, Apr 28, 2005 at 10:56:57AM CEST, I got a letter
where Pavel Machek <[email protected]> told me that...
> To get diff between your working tree and "next tree up", do cg-diff
> -r origin: . If you want to get the same diff but separated
> patch-by-patch, do cg-mkpatch origin: . If you want to pull changes
> from the "up" tree to your working tree, do cg-pull origin followed by
> cg-merge origin.

Note that you can use shortcut:

cg-update origin

is equivalent to cg-pull && cg-merge.

--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor

2005-04-28 10:22:27

by David Greaves

[permalink] [raw]
Subject: Re: kernel hacker's git howto

I think a lot of people on the git list would like to see this - please
CC :)

David

Pavel Machek wrote:

>Hi!
>
>Here's my current version of git HOWTO. I'd like your comments...
>
> Kernel hacker's guide to git
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 2005 Pavel Machek <[email protected]>
>
>You can get cogito at http://www.kernel.org/pub/software/scm/cogito/
>. Compile it, and place it somewhere in $PATH. Then you can get kernel
>by running
>
>mkdir clean-cg; cd clean-cg
>cg-init rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
>
>... Do cg-update origin to pickup latest changes from Linus. You can
>do cg-diff to see what changes you done in your local tree. cg-cancel
>will kill any such changes, and cg-commit will make them permanent.
>
>To get diff between your working tree and "next tree up", do cg-diff
>-r origin: . If you want to get the same diff but separated
>patch-by-patch, do cg-mkpatch origin: . If you want to pull changes
>from the "up" tree to your working tree, do cg-pull origin followed by
>cg-merge origin.
>
>
>How to set up your trees so that you can cooperate with linus
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>What I did:
>
>Created clean-cg. Initialized straight from Linus (as above). Then I
>created "nice" tree, good for Linus to pull from
>
>mkdir /data/l/linux-good; cd /data/l/linux-good
>cg-init /data/l/clean-cg
>
>and then my working tree, based on linux-good
>
>mkdir /data/l/linux-cg; cd /data/l/linux-cg
>cg-init /data/l/linux-good
>
>. I do my work in linux-cg. If someone sends me nice patch I should
>pass up, I apply it to linux-good with nice message and do
>
>cd /data/l/linux-cg; cg-pull origin; cg-merge origin
>
>
>

--