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

Re: git-checkout sometimes silently fails

From
AMAndrew Morton <akpm@linux-foundation.org>
Date
May 7, 2008, 00:43 UTC
Message-ID
<20080506174348.8d99fe4e.akpm@linux-foundation.org>
In-Reply-To
<7v4p9bge4q.fsf@gitster.siamese.dyndns.org>
On Tue, 06 May 2008 17:19:01 -0700 Junio C Hamano <gitster@pobox.com> wrote:
Show 17 quoted lines
> Andrew Morton <akpm@linux-foundation.org> writes:
> 
> > y:/usr/src/git26> git-branch -av | grep '^\*'
> > * master               5717922 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb
> > y:/usr/src/git26> git-checkout linux-next    
> > Switched to branch "linux-next"
> > y:/usr/src/git26> git-branch -av | grep '^\*'
> > * linux-next           5717922 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb
> 
> So your two local branches 'master' and 'linux-next' both point at the
> same commit, 5717922.
> 
> "git checkout <branchname>" is to check out the local branch name.  You
> expect "git checkout master" and then "git checkout linux-next" to check
> out two different commits because linux-next _should_ have been updated to
> the latest from sfr repository.  But it appears to me that that is not the
> case.
I did a git-fetch of linux-next yesterday.
> Perhaps "git fetch linux-next" hasn't been run, before "git checkout" was
> attempted?

I reran `git-fetch linux-next' and that downlaoded a heap of stuff (perhaps necause linux-next rebases every time?) and after this, `git-checkout linux-next' gives me what I expect.

But how come I couldn't check out yesterday's linux-next?
Previous: Junio C HamanoNext: J. Bruce Fields
Message 5 of 10 in “git-checkout sometimes silently fails”
  1. Andrew MortonMay 6, 2008
  2. Alex RiesenMay 6, 2008
  3. Andrew MortonMay 7, 2008
  4. Junio C HamanoMay 7, 2008
  5. Andrew MortonMay 7, 2008
  6. J. Bruce FieldsMay 7, 2008
  7. Jeff KingMay 7, 2008
  8. Andrew MortonMay 7, 2008
  9. Björn SteinbrinkMay 7, 2008
  10. Johannes SixtMay 7, 2008

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.