Git克隆到分支 [英] Git clone to branch
本文介绍了Git克隆到分支的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨
当我克隆Git repo时,它从Master分支获取数据,但我想克隆或从Dev分支中获取数据分支
When i clone Git repo it is getting the data from Master branch but i want to clone or get the data from the Dev branch which is present in the same branch
你能不能帮我一下这些命令
Can you please help me with the commands
我到目前为止使用了以下命令
I have used below commands till now
git clone https:// AAAAAA / _git
git clone https://AAAAAA/_git
推荐答案
克隆回购后,执行此操作(在回购中):
After you cloned the repo, do this (in the repo):
git checkout dev
分支开发设置为从源跟踪远程分支dev。
切换到新分支'dev'
git checkout dev Branch dev set up to track remote branch dev from origin. Switched to a new branch 'dev'
您也可以将(在TFS中)默认分支设置为dev,这是克隆时获得的分支。
You could also set (in TFS) the default branch to dev, so that's the branch you get when cloning.
这篇关于Git克隆到分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文