[英]How to merge two branches on remote repos
I have a remote repo. 我有一个远程仓库。 It has four branches ie master, branch1, branch2, branch3.
它具有四个分支,即master,branch1,branch2,branch3。 I pushed changes to master repo.
我将更改推送到主存储库。 Now I want to add those changes to branch3.
现在,我要将这些更改添加到branch3。 Do I have to merge them If yes then how can I do that?
我是否必须合并它们?如果是,那我该怎么做?
I think it's just 我认为只是
git checkout branch3
git rebase master
Yes, first make sure you are in sync with your remotes: 是的,首先请确保您与遥控器保持同步:
checkout master
pull origin master
checkout branch3
pull origin branch3
then do the merge 然后进行合并
merge master
then push if you need to 然后在需要时推动
push origin branch3
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.