有人推了一个分行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 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
其他回答
我使用以下命令:
git checkout --track origin/other_remote_branch
git 检出 -b "Branch_name" [B 意指创建本地分支]
git 分支-all
git 检出 -b “您的分支名称”
git 分支分支
git 拖拉源 "您的分支名称"
从母版分支向 dev 分支成功退出
我用了那个:
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
出于某种原因,我不能做:
git checkout -b branch-name origin/branch-name
它在抛出错误:
致命 : “ 来源/ 分支名称” 不是一个承诺, 无法从中创建分支“ 分支名称 ” 。
我必须这样做:
git checkout -b branch-name commit-sha
首先,你需要做的是:
git fetch
如果你不知道 分支名称
git fetch origin branch_name
第二,您可通过下列方式检查远程分支进入本地 :
git checkout -b branch_name origin/branch_name
-b
将从您选中的远程分支中以指定的名称创建新分支 。