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

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

当前回答

这些答案对我毫无用处。

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

其他回答

在这种情况下,你可能想要 创建本地test正在跟踪远程test分支 :

$ git branch test origin/test

先前版本的git,你需要一个明确的--track选项,但当您正在从一个远程分支进行分支分割时,这是默认值。

创建本地分支切换到它,使用:

$ git checkout -b test origin/test

在我看来,没有人建议 最简单的方法(也许我太笨了 觉得这太蠢了)"一种方式"但无论如何,试试这个:

git pull origin remoteBranchName
git switch remoteBranchName

这对我也有效(在我最后一次拉拉请求后,在遥控器上创建了一个分支)。

从远程获取并检查分支。

git fetch <remote_name> && git checkout <branch_name> 

例如:

git 获取来源 git 检出功能/ XYZ-1234- Add- 警告

我用了那个:

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 检出 -b "Branch_name" [B 意指创建本地分支]

git 分支-all

git 检出 -b “您的分支名称”

git 分支分支

git 拖拉源 "您的分支名称"

从母版分支向 dev 分支成功退出

enter image description here