有人推了一个分行test
与git push origin test
共享仓库的共享仓库。git branch -r
如何查看遥控器test
我试过了
git checkout test
,它没有做任何事情git checkout origin/test
给给* (no branch)
有人推了一个分行test
与git push origin test
共享仓库的共享仓库。git branch -r
如何查看遥控器test
我试过了
git checkout test
,它没有做任何事情git checkout origin/test
给给* (no branch)
当前回答
这将DWIM DEWIM DEWIM DEWIM DEWIM DEWIM DEWIM DEWIM DEWIM DEWIM DIWIM DEWIM DIWIM DIWWM DI DIWIM DI DIWIM DI DIWIM DI DIWM DIWIM DI DIWM DI DI DIWIM DI DI DIWM远程未命名来源( 用于远程未命名来源) 。文档文件文件):
$ git checkout -t remote_name/remote_branch
要添加一个新的远程, 您需要首先做以下操作 :
$ git remote add remote_name location_of_remote
$ git fetch remote_name
第一个告诉Git 遥控器存在, 第二个得到承诺。
其他回答
在我看来,没有人建议 最简单的方法(也许我太笨了 觉得这太蠢了)"一种方式"但无论如何,试试这个:
git pull origin remoteBranchName
git switch remoteBranchName
这对我也有效(在我最后一次拉拉请求后,在遥控器上创建了一个分支)。
我不确定,我日复一日地做这个,下面的命令就像宝石一样
dev ,dev ,dev ,dev ,dev ,dev是您想要检查的分支 。
git fetch && git checkout dev
要获得所有边远的分支, 请使用这个 :
git fetch --all
然后检查到分支:
git checkout test
获得新创建的分支
git fetch
要切换到另一个分支
git checkout BranchName
我用了那个:
git clean -fxd # removes untracked (new added plus ignored files)
git fetch
git checkout {branchname}
git reset --hard origin/{branchname} # removes staged and working directory changes