有人将称为 Git 推力源测试的分支推向共享仓库 。 我可以看到有 git 分支 -r 的分支 。 我如何查看远程测试分支 ? 我试过 :
git 检出测试, 它不会给 git 检出源/ 测试提供任何结果 * (无分支)
有人将称为 Git 推力源测试的分支推向共享仓库 。 我可以看到有 git 分支 -r 的分支 。 我如何查看远程测试分支 ? 我试过 :
git 检出测试, 它不会给 git 检出源/ 测试提供任何结果 * (无分支)
当前回答
git 分支 -r 表示对象名称无效, 因为该分支名称不在 Git 的本地分支列表中。 从源头更新您的本地分支列表 :
git remote update
然后尝试再检查一下你的远程分支。
这是为我工作。
我相信在所有偏远的树枝里都会拉拉, 这并不是最初的海报所希望的。
其他回答
git 分支 -r 表示对象名称无效, 因为该分支名称不在 Git 的本地分支列表中。 从源头更新您的本地分支列表 :
git remote update
然后尝试再检查一下你的远程分支。
这是为我工作。
我相信在所有偏远的树枝里都会拉拉, 这并不是最初的海报所希望的。
请遵循命令创建空文件夹。 请输入并使用此命令 :
saifurs-Mini:YO-iOS saifurrahman$ git clone your_project_url
Cloning into 'iPhoneV1'...
remote: Counting objects: 34230, done.
remote: Compressing objects: 100% (24028/24028), done.
remote: Total 34230 (delta 22212), reused 15340 (delta 9324)
Receiving objects: 100% (34230/34230), 202.53 MiB | 294.00 KiB/s, done.
Resolving deltas: 100% (22212/22212), done.
Checking connectivity... done.
saifurs-Mini:YO-iOS saifurrahman$ cd iPhoneV1/
saifurs-Mini:iPhoneV1 saifurrahman$ git checkout 1_4_0_content_discovery
Branch 1_4_0_content_discovery set up to track remote branch 1_4_0_content_discovery from origin.
Switched to a new branch '1_4_0_content_discovery'
工作命令
git 获取源“ remote_ branch ” : “ 本地_ branch_ name” git开关 “ 本地_ branch_ name” git pull 源“ remote_ branch ” : “ 本地_ branch_ name ”
第一个是从远程分支获取分支和创建本地分支。
第二个是转换到当地分行。
第三是将最近的远程更改拖到本地分支。
要获得所有远程分支, 请使用这个 :
git fetch --all
然后检查到分支 :
git checkout test
这将为未命名的远程来源( 文档) 提供宽度 :
$ git checkout -t remote_name/remote_branch
添加新的远程,您需要首先做以下操作:
$ git remote add remote_name location_of_remote
$ git fetch remote_name
第一次告诉遥控器的存在, 第二次得到承诺。