git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Mike Galbraith <efault@gmx.de>
Cc: git <git@vger.kernel.org>
Subject: Re: pulling Already up-to-date linux-2.6 repo takes ~8 minutes?
Date: Thu, 18 Oct 2007 01:48:34 -0400	[thread overview]
Message-ID: <20071018054834.GH14735@spearce.org> (raw)
In-Reply-To: <1192685971.7390.21.camel@Homer.simpson.net>

Mike Galbraith <efault@gmx.de> wrote:
> Dang.  git was happy with everything above except the checkout -b
> master, so I can't get off the dangling limb I'm on, and onto a solid
> branch.
> 
> root@Homer: git checkout -b master
> git checkout: branch master already exists
> root@Homer: git branch
> * (no branch)
>   master

Look to see if there's anything on your current master branch that
you don't want/need anymore:

	$ git log ..master

If that comes up empty (no output) or you mean to discard those
changes then you can just force create the branch and check it out:

	$ git branch -f master
	$ git checkout master

On the other hand if you want to keep those changes then you should
consider creating a different branch than master, or merging master
first:

	$ git merge master


> root@Homer: time git pull
> remote: Total 48507 (delta 38878), reused 44654 (delta 35166)
...

Well, you downloaded everything again.  However...

> 3419 objects were added to complete this thin pack.
> * refs/remotes/origin/master: fast forward to branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
>   old..new: 86a71db..d85714d

This time we actually stored a remote tracking branch.

So although we didn't actually merge Linus' current version into
your detached HEAD we did save it under a remote tracking branch
(named "origin/master") so the next time you run git-pull we won't
actually need to download that data again.  We already have it,
and know we have it.

Its just not in your current branch.

> You are not currently on a branch; you must explicitly
> specify which branch you wish to merge:
>   git pull <remote> <branch>

If you finish switching to a real branch with a configured remote
and merge entry then this message should go away and you should be
able to efficiently pull Linus' tree into your own.

-- 
Shawn.

  parent reply	other threads:[~2007-10-18  5:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-18  3:41 pulling Already up-to-date linux-2.6 repo takes ~8 minutes? Mike Galbraith
2007-10-18  4:50 ` Shawn O. Pearce
2007-10-18  5:09   ` Mike Galbraith
2007-10-18  5:39     ` Mike Galbraith
2007-10-18  5:42       ` Mike Galbraith
2007-10-18  5:48       ` Shawn O. Pearce [this message]
2007-10-18  5:54         ` Mike Galbraith
2007-10-18  5:57           ` Shawn O. Pearce
2007-10-18  6:05             ` Mike Galbraith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071018054834.GH14735@spearce.org \
    --to=spearce@spearce.org \
    --cc=efault@gmx.de \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).