Re: pulling Already up-to-date linux-2.6 repo takes ~8 minutes?
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Oct 18, 2007, 05:48 UTC
- Message-ID
- <20071018054834.GH14735@spearce.org>
- In-Reply-To
- <1192685971.7390.21.camel@Homer.simpson.net>
Mike Galbraith <efault@gmx.de> wrote:
Show 9 quoted lines
> 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.