2006-02-08 15:03:06

by Paul Jackson

[permalink] [raw]
Subject: How in tarnation do I git v2.6.16-rc2? hg died and I still don't git git

I'm trying to git a copy of Linus's tree, checked out only up
through revision v2.6.16-rc2, so that I can lay down Andrew's
latest broken-out quilt patch set for 2.6.16-rc2-mm1 on top of it.

I had been using hg (mercurial) to keep a current copy of Linus's
tree, and to make hg clones at each 2.6.*-rc*, to which I would apply
Andrew's various 2.6.*-rc*-mm*.

But the hg tree seems to have died on me, and I still don't git git.

I can do:

git pull rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git

and get Linus's tree as of the latest change, and I can do a "git log",
and see that I want a clone (in the hg sense, not the git sense) of
this tree as of:

commit 826eeb53a6f264842200d3311d69107d2eb25f5e
Author: Linus Torvalds <[email protected]>
Date: Thu Feb 2 22:03:08 2006 -0800

Linux v2.6.16-rc2

Once I have that clone of Linus's tree at this revision, I am happy
using quilt to push Andrew's 2.6.16-rc2-mm1 that I ftp'd from:

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16-rc2/2.6.16-rc2-mm1/

on top of this.

But how in tarnation do I git a checked out copy/clone/whatever of
Linus's tree that only has the changes up through revision v2.6.16-rc2
(that doesn't include changes since then)?

--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <[email protected]> 1.925.600.0401


2006-02-08 15:15:01

by Dale Farnsworth

[permalink] [raw]
Subject: Re: How in tarnation do I git v2.6.16-rc2? hg died and I still don't git git

In article <[email protected]> Paul Jackson wrote:
> But how in tarnation do I git a checked out copy/clone/whatever of
> Linus's tree that only has the changes up through revision v2.6.16-rc2
> (that doesn't include changes since then)?

git-clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git linux-2.6
cd linux-2.6
git-checkout -b v2.6.16-rc2 v2.6.16-rc2

2006-02-08 15:14:19

by Mattia Dongili

[permalink] [raw]
Subject: Re: How in tarnation do I git v2.6.16-rc2? hg died and I still don't git git

Hello,

On Wed, Feb 08, 2006 at 07:03:01AM -0800, Paul Jackson wrote:
> I'm trying to git a copy of Linus's tree, checked out only up
> through revision v2.6.16-rc2, so that I can lay down Andrew's
> latest broken-out quilt patch set for 2.6.16-rc2-mm1 on top of it.
[...]
> But how in tarnation do I git a checked out copy/clone/whatever of
> Linus's tree that only has the changes up through revision v2.6.16-rc2
> (that doesn't include changes since then)?

I usually create a branch for each -mm release and add there all the
patches, eg:
git checkout -f -b v2.6.16-rc2-mm1 v2.6.16-rc2

then do something like:
while [ $(quilt next) ] ; do \
quilt push && git add && git commit -a -m "$(quilt top)"; \
done

as an alternative you canprobably checkout HEAD and git-reset --hard to
the wanted commit.

hth
--
mattia
:wq!

2006-02-08 15:16:41

by Sean

[permalink] [raw]
Subject: Re: How in tarnation do I git v2.6.16-rc2? hg died and I still don't git git

On Wed, 8 Feb 2006 07:03:01 -0800
Paul Jackson <[email protected]> wrote:

> But how in tarnation do I git a checked out copy/clone/whatever of
> Linus's tree that only has the changes up through revision v2.6.16-rc2
> (that doesn't include changes since then)?

Hi Paul,

You create a branch. This will be a bit easier if you have all of the
tags for each of Linus' releases, do:

$ git fetch --tags

Then you create the branch as at the commit you're interested in:

$ git checkout -b working v2.6.16-rc2

Which tells git to create a branch named "working" as at the commit
referenced by the tag "v2.6.16-rc2". You can see this worked
by:

$ git branch
master
origin
* working

Where the asterisk shows you that you're now operating in the "working"
branch. And "git log" will show you that the HEAD commit is the
one you're interested in.

HTH,
Sean

2006-02-08 15:27:44

by Paul Jackson

[permalink] [raw]
Subject: Re: How in tarnation do I git v2.6.16-rc2? hg died and I still don't git git

The winner, by a slim six seconds over 2nd place ;)

git-checkout -b v2.6.16-rc2 v2.6.16-rc2

Thanks.

--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <[email protected]> 1.925.600.0401

2006-02-08 17:53:45

by Bryan O'Sullivan

[permalink] [raw]
Subject: Re: How in tarnation do I git v2.6.16-rc2? hg died and I still don't git git

On Wed, 2006-02-08 at 07:03 -0800, Paul Jackson wrote:

> I had been using hg (mercurial) to keep a current copy of Linus's
> tree, and to make hg clones at each 2.6.*-rc*, to which I would apply
> Andrew's various 2.6.*-rc*-mm*.
>
> But the hg tree seems to have died on me, and I still don't git git.

Using Mercurial, pull from here instead:

hg pull http://master.kernel.org/hg/linux-2.6

2006-02-08 18:06:34

by Paul Jackson

[permalink] [raw]
Subject: Re: How in tarnation do I git v2.6.16-rc2? hg died and I still don't git git

> Using Mercurial, pull from here instead:
>
> hg pull http://master.kernel.org/hg/linux-2.6

That works.

On another thread, Matt Mackall asks we not change
our default URL to the above master.kernel site,
as it has much less bandwidth.

And he says he should have the recommended site
back up shortly:

http://www.kernel.org/hg/linux-2.6

--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <[email protected]> 1.925.600.0401

2006-02-09 13:08:26

by Jes Sorensen

[permalink] [raw]
Subject: git for dummies, anyone? (was: Re: How in tarnation do I git v2.6.16-rc2? hg died and I still don't git git)

>>>>> "Paul" == Paul Jackson <[email protected]> writes:

Paul> I'm trying to git a copy of Linus's tree, checked out only up
Paul> through revision v2.6.16-rc2, so that I can lay down Andrew's
Paul> latest broken-out quilt patch set for 2.6.16-rc2-mm1 on top of
Paul> it.

Hi Paul,

I had a similar problem yesterday and was pointed at
https://wiki.ubuntu.com/KernelGitGuide?highlight=%28CategoryKernel%29
as a starting point.

I was thinking it would be really nice if someone fancied writing a
git guide for dummies (like me) who only use git on and off. Something
that could be put either on git.kernel.org or a similar place.

Things like how to do basic checkouts, how to revert back to a certain
snapshot or a certain commit id, how to use git-bisect to track
breakage and other basic stuff.

Anyone looking for a pet project who fancies writing up something like
this? I can say for sure that it will be appreciated.

Cheers,
Jes

2006-02-09 14:17:50

by Jeff Garzik

[permalink] [raw]
Subject: Re: git for dummies, anyone?

Jes Sorensen wrote:
>>>>>>"Paul" == Paul Jackson <[email protected]> writes:
>
>
> Paul> I'm trying to git a copy of Linus's tree, checked out only up
> Paul> through revision v2.6.16-rc2, so that I can lay down Andrew's
> Paul> latest broken-out quilt patch set for 2.6.16-rc2-mm1 on top of
> Paul> it.
>
> Hi Paul,
>
> I had a similar problem yesterday and was pointed at
> https://wiki.ubuntu.com/KernelGitGuide?highlight=%28CategoryKernel%29
> as a starting point.
>
> I was thinking it would be really nice if someone fancied writing a
> git guide for dummies (like me) who only use git on and off. Something
> that could be put either on git.kernel.org or a similar place.


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

Jeff


2006-02-09 14:36:32

by Josh Boyer

[permalink] [raw]
Subject: Re: git for dummies, anyone?

On 2/9/06, Jeff Garzik <[email protected]> wrote:
> Check out:
> http://linux.yyz.us/git-howto.html

Any reason that doesn't use the git:// protocol? It'll fetch the tags
for you, etc. And I think it's the "preferred" way of using git when
working with the kernel.

josh

2006-02-09 14:43:12

by Jes Sorensen

[permalink] [raw]
Subject: Re: git for dummies, anyone?

>>>>> "Jeff" == Jeff Garzik <[email protected]> writes:

Jeff> Jes Sorensen wrote:
>> Hi Paul, I had a similar problem yesterday and was pointed at
>> https://wiki.ubuntu.com/KernelGitGuide?highlight=%28CategoryKernel%29
>> as a starting point. I was thinking it would be really nice if
>> someone fancied writing a git guide for dummies (like me) who only
>> use git on and off. Something that could be put either on
>> git.kernel.org or a similar place.

Jeff> Check out: http://linux.yyz.us/git-howto.html

Hi Jeff,

Thanks, I'll add that to my bookmarks as well, but it's still missing
some important stuff, like how to roll back to a specific commit id
and git-bisect ;-) It seems a bit more targetted towards being a git
tree maintainer than a client.

Having some of this linked off git.kernel.org would be wonderful too
since at least for me seems to be the most logical place for anyone to
start looking for info.

Thanks,
Jes

2006-02-09 14:50:16

by Paul Jackson

[permalink] [raw]
Subject: Re: git for dummies, anyone? (was: Re: How in tarnation do I git v2.6.16-rc2? hg died and I still don't git git)

Thanks for the git guide links.

I spent some time reading them yesterday (not the Ubuntu
one you pointed to, but others.)

After repeated efforts, beginning with the birth of git,
it is clear that I have some sort of congenital mental
defect that makes me unsuited for using git.

Hopefully someone benefited from your links.

--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <[email protected]> 1.925.600.0401

2006-02-09 14:55:32

by Paul Jackson

[permalink] [raw]
Subject: Re: git for dummies, anyone?

Jeff wrote:
> Check out: http://linux.yyz.us/git-howto.html

I did. I spent some time reading it, as one of
the best git howto's I could find.

Me and the git UI just weren't met to be.

--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <[email protected]> 1.925.600.0401

2006-02-09 15:35:53

by Diego Calleja

[permalink] [raw]
Subject: Re: git for dummies, anyone?

El Thu, 09 Feb 2006 09:17:41 -0500,
Jeff Garzik <[email protected]> escribi?:


> Check out:
> http://linux.yyz.us/git-howto.html

That is a nice guide, but is oriented to developers, I think jes
was asking from a user POV (I've needed to google for such things
several times) ie how to switch to a given tag and return to master,
how to update the repository periodically, etc; no stuff about how to
manage patches. It may be nice to see such thing on your guide, something
like this:


- How to get a copy of linus'tree
git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git

- Update your copy:
cd linux-2.6; git pull; git pull --tags

- How to go back to a certain snapshot
git reset --hard v2.6.13 (ls .git/refs/tags to see all the tags). Not the
cleanest method, I think. "git-checkout -f master" will return to the "head"
of the repository. You can also pass commit-IDs to git-reset instead of tags?

- bisect search
git reset --hard BrokenVersion
git bisect start
git bisect good v2.6.13-rc2

Compile, test, and do "git bisect good" or "git bisect bad" until you find
the culprit. If it doesn't compile or something you can do a "git bisect good/bad"
"git bisect reset" resets the repository when you are done.
http://www.kernel.org/pub/software/scm/git/docs/howto/isolate-bugs-with-bisect.txt
explains it with more detail.

2006-02-09 15:56:54

by Jes Sorensen

[permalink] [raw]
Subject: Re: git for dummies, anyone?

>>>>> "Diego" == Diego Calleja <[email protected]> writes:

Diego> El Thu, 09 Feb 2006 09:17:41 -0500, Jeff Garzik
Diego> <[email protected]> escribi??:

>> Check out: http://linux.yyz.us/git-howto.html

Diego> That is a nice guide, but is oriented to developers, I think
Diego> jes was asking from a user POV (I've needed to google for such
Diego> things several times) ie how to switch to a given tag and
Diego> return to master, how to update the repository periodically,
Diego> etc; no stuff about how to manage patches. It may be nice to
Diego> see such thing on your guide, something like this:

Diego,

Yup thats pretty much it. My usage of git upto now has pretty much
been:

quilt pop -a
git-pull
quilt push -a
<rebuild>

Suddenly something broke with the git-pull and I needed to track down
which change it was.

Cheers,
Jes

2006-02-09 16:07:56

by J. Bruce Fields

[permalink] [raw]
Subject: Re: git for dummies, anyone?

On Thu, Feb 09, 2006 at 04:35:46PM +0100, Diego Calleja wrote:
> - Update your copy:
> cd linux-2.6; git pull; git pull --tags

Note just the one "git pull" seems to fetch tags on its own now without
need for the last step.

> - How to go back to a certain snapshot
> git reset --hard v2.6.13 (ls .git/refs/tags to see all the tags). Not the
> cleanest method, I think.

If you intend to do apply patches against that particular version, you
could also create a new branch:

git checkout -b my-v2.6.13-branch v2.6.13

or if you know from the start that you only want to update up to a
certain version,

git pull tag v2.6.13

instead of just "git pull".

I did some work on a new tutorial under Documentation/tutorial.txt in
the git source tree:

http://www.kernel.org/pub/software/scm/git/docs/tutorial.html

which might be helpful, though it isn't so specifically targetted at the
case of linux testers. It wouldn't be hard to write something like
that, though. Git should make that kind of use pretty easy.

--b.

2006-02-09 16:37:33

by Marc Burkhardt

[permalink] [raw]
Subject: Re: git for dummies, anyone?

* Diego Calleja <[email protected]> [2006-02-09 16:35:46 +0100]:

> El Thu, 09 Feb 2006 09:17:41 -0500,
> Jeff Garzik <[email protected]> escribi?:
>
>
> > Check out:
> > http://linux.yyz.us/git-howto.html
>
> That is a nice guide, but is oriented to developers, I think jes
> was asking from a user POV (I've needed to google for such things
> several times) ie how to switch to a given tag and return to master,
> how to update the repository periodically, etc; no stuff about how to
> manage patches. It may be nice to see such thing on your guide, something
> like this:
>
>
> - How to get a copy of linus'tree
> git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
>
> - Update your copy:
> cd linux-2.6; git pull; git pull --tags
>
> - How to go back to a certain snapshot
> git reset --hard v2.6.13 (ls .git/refs/tags to see all the tags). Not the
> cleanest method, I think. "git-checkout -f master" will return to the "head"
> of the repository. You can also pass commit-IDs to git-reset instead of tags?
>
> - bisect search
> git reset --hard BrokenVersion
> git bisect start
> git bisect good v2.6.13-rc2

I can be sooo easy. Thanks! ;)

Marc

2006-02-09 16:47:17

by Catalin Marinas

[permalink] [raw]
Subject: Re: git for dummies, anyone?

Paul Jackson <[email protected]> wrote:
> Jeff wrote:
>> Check out: http://linux.yyz.us/git-howto.html
>
> I did. I spent some time reading it, as one of
> the best git howto's I could find.
>
> Me and the git UI just weren't met to be.

If you've ever used Quilt (even if you haven't), try StGIT -
http://www.procode.org/stgit/, it might suit you better (IIRC, you
tried it already but were not happy with the first version; it is much
improved now :-)).

--
Catalin

2006-02-09 23:16:56

by Willy Tarreau

[permalink] [raw]
Subject: Re: git for dummies, anyone? (was: Re: How in tarnation do I git v2.6.16-rc2? hg died and I still don't git git)

On Thu, Feb 09, 2006 at 06:50:11AM -0800, Paul Jackson wrote:
> Thanks for the git guide links.
>
> I spent some time reading them yesterday (not the Ubuntu
> one you pointed to, but others.)
>
> After repeated efforts, beginning with the birth of git,
> it is clear that I have some sort of congenital mental
> defect that makes me unsuited for using git.

Hey Paul, welcome to the club, you're not alone :-)

Every time I use it, I spend more time fixing my mistakes
than doing useful work. I'm at the point of doing a "cp -a"
before starting anything because it too often gets very bad
after a few operations. Even git-reset often fails for me.

I think that the biggest problem is that it's not intuitive,
so if you don't use it often, it's hard to remember all the
tricks. Anyway, there are so many people happy with it that
I think that *we both* have mental defects. BTW, have you
tried cogito ? Not much more intuitive, but at least, it
reduces the number of commands for some basic operations,
and this sometimes leads to less mistakes.

> Hopefully someone benefited from your links.
>
> --
> I won't rest till it's the best ...
> Programmer, Linux Scalability
> Paul Jackson <[email protected]> 1.925.600.0401

Cheers,
Willy

2006-02-10 00:04:04

by Paul Jackson

[permalink] [raw]
Subject: Re: git for dummies, anyone? (was: Re: How in tarnation do I git v2.6.16-rc2? hg died and I still don't git git)

Willy wrote:
> BTW, have you tried cogito ?

Yes - I used it for a little, until I discovered
Matt Mackall's Mercurial (Hg):

http://selenic.com/mercurial/

I've been a delighted user of hg ever since.

--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <[email protected]> 1.925.600.0401

2006-02-10 06:23:16

by Willy Tarreau

[permalink] [raw]
Subject: Re: git for dummies, anyone? (was: Re: How in tarnation do I git v2.6.16-rc2? hg died and I still don't git git)

On Thu, Feb 09, 2006 at 04:03:58PM -0800, Paul Jackson wrote:
> Willy wrote:
> > BTW, have you tried cogito ?
>
> Yes - I used it for a little, until I discovered
> Matt Mackall's Mercurial (Hg):
>
> http://selenic.com/mercurial/
>
> I've been a delighted user of hg ever since.

I did the opposite : I tried hg as soon as Matt announced it, but I
got lost in the "python dumps" which appeared at the slightest error,
because I did not understand what the problem was. Then I tried git,
at least to be able to keep in sync with Marcelo. With git, I had
some opportunities to catch some understandable error messages spit
out of some shell scripts even when not caught by the script itself.
But using it less than twice a week requires me to read the manual
again before doing anything useful :-(

Willy

2006-02-10 14:08:48

by Theodore Ts'o

[permalink] [raw]
Subject: Re: git for dummies, anyone? (was: Re: How in tarnation do I git v2.6.16-rc2? hg died and I still don't git git)

On Fri, Feb 10, 2006 at 07:23:09AM +0100, Willy Tarreau wrote:
> I did the opposite : I tried hg as soon as Matt announced it, but I
> got lost in the "python dumps" which appeared at the slightest error,
> because I did not understand what the problem was. Then I tried git,
> at least to be able to keep in sync with Marcelo. With git, I had
> some opportunities to catch some understandable error messages spit
> out of some shell scripts even when not caught by the script itself.
> But using it less than twice a week requires me to read the manual
> again before doing anything useful :-(

Mercurial has gotten a lot better about "python dumps" as a signal
that you had typed something wrong, or had permissions problems, etc.
I got annoyed about that too, but I just learned to ignore them and
assume that 90% of the time, it was due to a mistake on my end.
Things are a lot better there; claiming mercurial sucks for its early
rough edges is about as far as claiming that git sucks because its
performance sucked rocks on laptop drives in its early days before
Linus added support for packs.

- Ted