Re: git-checkout sometimes silently fails

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

 



Andrew Morton schrieb:
> 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

You did not show us the output of 'git branch -av'. Do you happen to see
something like this in the output:

* master               5717922 Merge branch 'for_linus'
  linux-next           5717922 Merge branch 'for_linus'
  linux-next/HEAD      1234567 Something completely different
  linux-next/master    1234567 Something completely different

In this case, your local branch 'linux-next' is probably a left-over from
earlier experiments. The last two branches are actually what you want to
refer to. Normally, the 'linux-next/HEAD' part allows you to refer to
'linux-next/master' by saying simply 'linux-next'. But unfortunately, your
local branch name 'linux-next' takes precedence.

'git fetch' never updates your local branch, but only 'linux-next/master'
(and its alias 'linux-next/HEAD' aka 'linux-next').

To return to a sane state, do 'git branch -D linux-next'.

-- Hannes
--
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