Re: pulling Already up-to-date linux-2.6 repo takes ~8 minutes?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mike Galbraith <efault@xxxxxx> 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.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux