git 重新安装后没有看到分支 osx

git doesn't see branches after reinstallation osx

我对 git 很陌生。完成 osx 重新安装后,我注意到我无法切换到我之前创建的其他分支......只有 master:

$ cd /usr/local
$ git branch -a
  * master
  remotes/origin/master

在 github 上我看到了我所有的 4 个早午餐……我想恢复它们……

谁能解释一下如何让我的其他分支可用?

如果您是 Github 的新手,我强烈建议您使用 github 桌面应用程序以避免 complexities.You 可以在这里轻松管理您的分支机构。当您习惯环境、概念和东西时,命令行总是在那里为您提供支持。

https://desktop.github.com

自己找到答案:

$ git fetch origin

# check all(remote branches):
$ git branch -v -a

#check out the branch(get local working copy):
$ git checkout -b test origin/test