Re: nicer frontend to get rebased tree?
- From
- Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
- Date
- Aug 22, 2008, 20:11 UTC
- Message-ID
- <4d8e3fd30808221311w7c507abboecd0893def85a073@mail.gmail.com>
- In-Reply-To
- <alpine.LFD.1.10.0808221233100.3487@nehalem.linux-foundation.org>
On Fri, Aug 22, 2008 at 9:36 PM, Linus Torvalds <torvalds@linux-foundation.org> wrote:
Show 27 quoted lines
> > > On Fri, 22 Aug 2008, Andi Kleen wrote: >> >> Well git fetch does nothing by itself. > > Git fetch does exactly what it should do by itself. > > If you think it does "nothing", you're really confused. > > It updates the "remote" branches - the ones you are downlaoding. > >> Sorry that's what I though initially too. But that's wrong. Just clone >> e.g. linux-next and then try to update it with pull a day later. > > You SHOULD NOT DO THAT! > > linux-next is not a tree that you can track. It's a tree that you can > fetch _once_ and then throw away. > > So what you can do is to "fetch" linux-next, and test it. But you MUST > NEVER EVER use it for anything else. You can't do development on it, you > cannot rebase onto it, you can't do _anything_ with it. > > So what you can do is to "git fetch" it (to download it), and then "git > checkout" to create a temporary checkout. That's pretty much all you can > do with linux-next.
Linus, sorry for the double posting.
I agree, but I would like to point out a typical use case: git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git git remote add tip git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git git remote update (to fetch both the trees, now i can "track" your branch with a simple merge which will results in a fast forward) git checkout -b tip-latest tip/master
since tip/master is often rebased (as pu or linux-next) what I do is the following: git branch -D tip-latest git checkout -b tip-latest tip/master
but I guess lot of people would expect to "throw away" and "checkout again" with a single git command.
Does it make sense?
Ciao,
-- Paolo http://paolo.ciarrocchi.googlepages.com/