【发布时间】:2015-03-29 09:24:38
【问题描述】:
我显然遗漏了一些东西,因为我无法从我在本地使用的 git repo 获取服务器上我需要的远程分支。
在我的本地开发环境中
我运行git remote -v,它给了我:
origin git@git.example.com:the_repo (fetch)
origin git@git.example.com:the_repo (push)
我运行git branch,它给了我:
* live
master
在我的实时服务器环境中
我运行git remote -v,它给了我:
origin git@git.example.com:the_repo (fetch)
origin git@git.example.com:the_repo (push)
我运行git branch,它给了我:
* master
当我尝试通过运行git fetch 或git fetch origin 来解决这种情况时,在再次运行git branch 时仍然看不到我的live 分支。我怀疑这是因为git branch 只列出了我当地的分支机构。
如何在本地签出之前获取 repo 的远程分支并列出它们?
非常感谢 - 非常感谢。
【问题讨论】:
标签: git version-control git-branch git-remote git-checkout