如何将远程主机合并到本地分支 [英] How to merge remote master to local branch

查看:465
本文介绍了如何将远程主机合并到本地分支的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个项目的本地分支(configUpdate),我从其他人的项目中分出来,我已经对它进行了一系列更改,并希望将他们所做的更改合并到我的本地分支。



我试过了

  git pull  - rebase origin configUpdate 

但它没有抓住最新的变化 - 我怎么能合并这两个? (也用于奖励积分,我对 pull --rebase 命令做了什么?)

解决方案

  $ git fetch upstream 
$ git merge upstream / master


I have a local branch of a project ("configUpdate") that I've forked from somebody else's project and I've done a load of changes on it and would like to merge the changes they've made in to my local branch.

I've tried

git pull --rebase origin configUpdate

but it hasn't grabbed the latest changes - how can I merge the two? (also for bonus points what did I do with the pull --rebase command?)

解决方案

I found out it was:

$ git fetch upstream
$ git merge upstream/master

这篇关于如何将远程主机合并到本地分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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