从git拉特定的分支 [英] Pull specific branch from git
问题描述
我在 bitbucket
中有一个回购,并使用 git
。
所以我的分支是
$ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $
当我使用 git clone git@bitbucket.org:project / project.git
,我得到的只是主分支代码,但我需要克隆/只拉 develop_one
分支,所以如何克隆/只拉 develop_one
分支代码?
注意:其他分支(develop_one,develop_two)未合并到master ,并且不想合并,直到实际完成功能,所以想要获得/克隆/只拉一个特定的分支代码
Try:
对于已经克隆好的回购使用: 这将跟踪develop_one分支从远程。 I have a repo in So my branches are When i use Note: The other branches(develop_one, develop_two) are not merged in to master, and dont want to merge until the functionality has been completed actually, so want to get/clone/pull only a specific branch code Try: For already cloned repos use: This will track the develop_one branch from the remote. 这篇关于从git拉特定的分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! git clone git@bitbucket.org:project / project.git -b develop_one --single-branch $ c
$ b
git fetch
git checkout develop_one
#或者更具体的:
git checkout --track -b develop_one
bitbucket
, and i am using git
.master
develop_one
develop_two
git clone git@bitbucket.org:project/project.git
, i am getting only the master branch code, but i need to clone/pull only develop_one
branch, so how to clone/pull only develop_one
branch code ?git clone git@bitbucket.org:project/project.git -b develop_one --single-branch
git fetch
git checkout develop_one
# Or more specific:
git checkout --track -b develop_one