Rafael Espindola wrote:
>> Because the right one should have been
>>
>> $ git config --add remote.origin.fetch '+refs/heads/*:refs/remotes/origin/*'
>>
> 
> That is what "git clone" adds, but with that "git branch -r" will not
> list the remote branches.

Uhm, it does here (I don't have a GCC repo, it's another one):

$ git branch -r
  mirror/cpp
  mirror/exc-handling-alternate-fix
  mirror/filesystem
  mirror/ipv6
  mirror/magritte
  mirror/master
  mirror/omnibrowser
  mirror/opengl
  mirror/opengl-nurbs
  mirror/poll-for-win32
  mirror/pool-resolution
  mirror/roe
  mirror/sdl
  mirror/seaside
  mirror/stable-2.1
  mirror/stable-2.2
  mirror/stable-2.3
  mirror/stable-3.0
  origin/HEAD
  origin/master
  origin/stable-2.1
  origin/stable-2.2
  origin/stable-2.3
  origin/stable-3.0
  stephen/master
  stephen/pool-resolution
  stephen/stable-3.0

You can see that it also lists branches for different remotes (with
distributed version control you need many of them, maybe one per
contributor).

Have you tried (after changing the .git/config line for
remote.origin.fetch) doing a "git fetch origin" to refresh the list of
available branches for the origin remote?  If it works now, you probably
want to remove the files in .git/refs/remotes/*.

Paolo

Reply via email to