git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.
Previous: Mike GalbraithNext: Mike Galbraith
Message 6 of 9 in “pulling Already up-to-date linux-2.6 repo takes ~8 minutes?”
  1. Mike GalbraithOct 18, 2007
  2. Shawn O. PearceOct 18, 2007
  3. Mike GalbraithOct 18, 2007
  4. Mike GalbraithOct 18, 2007
  5. Mike GalbraithOct 18, 2007
  6. Shawn O. PearceOct 18, 2007
  7. Mike GalbraithOct 18, 2007
  8. Shawn O. PearceOct 18, 2007
  9. Mike GalbraithOct 18, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.