如何在源代码树中拉远程分支

如何在源代码树中拉远程分支

本文介绍了如何在源代码树中拉远程分支的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在bitbucket中有回购.它有2个分支master和Branch9_Artiflex但是当我通过源树(源树中的克隆-克隆)将此仓库克隆到本地仓库时,我只能看到master分支.

I have repo in bitbucket. it has 2 branches master and Branch9_Artiflexbut when I clone this repo to my local repo via source tree (clone-clone in source tree) i'm able to see only master branch.

在本地计算机上创建新分支Branch9_Artiflex并从远程Branch9_Artiflex提取所有数据不起作用,因为它们具有不同的提交历史记录

Create new branch Branch9_Artiflex on my local machine and pull all data from remote Branch9_Artiflex doesn't work because they have differnet history of commits

源代码树

但是我的远程仓库有2个分支

推荐答案

尝试

  • git fetch.这将获取所有丢失的远程分支到本地存储库(假设没有其他问题).
  • git checkout Branch9_Artiflex.现在,您将切换到本地/Branch9_Artiflex,它是使用Origin/Branch9_Artiflex的最新更改新创建的. :))
  • git fetch . This would fetch any missed remote branch to local repository (assuming there's no other problem).
  • git checkout Branch9_Artiflex. Now you will be switched into a local/Branch9_Artiflex which is newly created with the latest changes of origin/Branch9_Artiflex. :))

这篇关于如何在源代码树中拉远程分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-24 04:57