如何从github拉取/获取分支到本地?

时间:2012-09-05 11:26:58

标签: git github

我需要切换到本地brach master到github分支功能/ ABF-3-project-structure

我运行以下命令。

git pull feature/ABF-3-project-structure

this is output of the command

enter image description here

请帮帮我。我已经尝试了至少3个小时但仍然没有运气

谢谢, Enamul

3 个答案:

答案 0 :(得分:2)

我不确定我是否理解您的问题,但可以使用以下代码切换到上述分支:git checkout feature/ABF-3-project-structure

答案 1 :(得分:2)

试试这个:

git pull {repo} {remotebranchname}:{localbranchname}

git pull origin abc:abc

如果您在主分支机构,您还应首先结帐分支机构:

 git checkout -b abc 

这应该从主人创建新的分支“abc”并直接检查出来。比你应该跑:

 git pull origin abc 

将新分支拉到您当地的abc分支

答案 2 :(得分:1)

我通过向github添加ssh密钥解决了这个问题。我以前在gitub上设置ssh密钥时使用git。

这很简单。我刚刚添加了ssh密钥并运行了以前的命令。这解决了我的问题。 :)

相关问题