将远程分支以不同的名称引入本地回购? [英] Pull remote branch into local repo with different name?

查看:98
本文介绍了将远程分支以不同的名称引入本地回购?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧我在这方面做了一些研究,但是找不到确切的答案,所以我不得不问。



我有2个遥控器:原点和$ rep $ 2.

我想要做一些类似于

  git pull repo2 master 

但是这会将repo2的master分支拉入我的master。我可以指定一个不同的分支来拉入我的本地分支吗?

解决方案

  git checkout -b myBranchName repo2 / master 


Alright I did a little bit of research on this but I couldn't find an exact answer, so I have to ask.

I have 2 remotes: origin and repo2.

I'd like to do something like

git pull repo2 master

But this would pull the master branch of the repo2 into my master. Can I specify a different branch to pull into, for my local branch ?

解决方案

git checkout -b myBranchName repo2/master

这篇关于将远程分支以不同的名称引入本地回购?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆