有人推了一个分行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)
当前回答
从远程获取并检查分支。
git fetch <remote_name> && git checkout <branch_name>
例如:
git 获取来源 git 检出功能/ XYZ-1234- Add- 警告
其他回答
在您的情况中,您可以使用此命令 :
git checkout -b test origin/test
命令
git fetch --all
git checkout -b <ur_new_local_branch_name> origin/<Remote_Branch_Name>
等于
git fetch --all
时和时
git checkout -b fixes_for_dev origin/development
两者将创造latest fixes_for_dev
调自development
要克隆 Git 仓库, 需要 :
git clone <either ssh url /http url>
上述命令检查了所有分支,但只检查了master
将初始化分支。 如果您想要检查其它分支, 请做 :
git checkout -t origin/future_branch (for example)
此命令检查远程分支, 您的本地分支名称将与远程分支相同 。
如果您想要在检查退出时覆盖您的本地分支名称 :
git checkout -t -b enhancement origin/future_branch
现在您的本地分支名称是enhancement
,但您的远程分支名称是future_branch
.
要获得所有边远的分支, 请使用这个 :
git fetch --all
然后检查到分支:
git checkout test
我使用以下命令:
git checkout --track origin/other_remote_branch