home | list info | list archive | date index | thread index

[OCLUG-Tech] question about "missing" branches and "git pull --rebase"

  • Subject: [OCLUG-Tech] question about "missing" branches and "git pull --rebase"
  • From: "Robert P. J. Day" <rpjday [ at ] crashcourse [ dot ] ca>
  • Date: Wed, 9 Dec 2015 07:35:11 -0500 (EST)
  acquaintance describes the following curious situation, which i've
never run across. he's cloned a repo, then tries to checkout an
alleged remote branch, only to get:

$ git branch
  dlbl2
  feature/6.2/apol_alu4
  master
* release/6.2

$ git checkout feature/6.2/SON5-12176
error: pathspec 'feature/6.2/SON5-12176' did not match any file(s) known to git.

  he claims that the workaround is to first:

$ git checkout master
$ git pull --rebase

after which it works:

$ git checkout feature/6.2/SON5-12176
Branch feature/6.2/SON5-12176 set up to track remote branch feature/6.2/SON5-12176 from origin.
Switched to a new branch 'feature/6.2/SON5-12176’
$

  i'm not sure what is happening here, but my first guess is that
someone else is working on his upstream repo and rebasing the master
branch, which somehow causes the other branches to "disappear", and
only after pulling and rebasing master do they "reappear". but that's
just a guess, i really have no idea.

  can someone explain this more definitively? thanks.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================