有人推了一个分行testgit push origin test共享仓库的共享仓库。git branch -r如何查看遥控器test我试过了

  • git checkout test,它没有做任何事情
  • git checkout origin/test给给* (no branch)

当前回答

要获得所有边远的分支, 请使用这个 :

git fetch --all

然后检查到分支:

git checkout test

其他回答

使用使用fetch以拉动全部远程

   git fetch --all

要列出远程分支 :

   git branch -r

列出您所有的分支

   git branch -l
   >>outpots like-
     * develop
       test
       master

要取出/更改分支

   git checkout master

git fetch && git checkout your-branch-name

您可以添加一个新的分支test在本地和随后使用上:

git branch --set-upstream-to=origin/test test

我使用以下命令:

git checkout --track origin/other_remote_branch

这些答案对我毫无用处。

git checkout -b feature/branch remotes/origin/feature/branch