将远程存储库提交合并到本地 [英] Merge remote repository commits to the local

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

问题描述

我有两个使用 C ++ Poppler 库的远程存储库,例如 A(original-poppler) B(另一个-poppler)。第二个 B 存储库的主要含义是为某些Linux发行版维护 Poppler 库并为它们构建rpm包。



B 是通过复制文件从 A 创建的 - 我看到第一个提交移植的最新版本和许多提交的文件 - 它应该来自一些 A 提交(版本 0.20 <
$ b

从这个Ported latest version开始 repository B 终其一生 - 添加了一些补丁,更新了规范文件等。



A 版本库已更新为版本 0.23.1(发行版) +之后的一些其他提交。
我可以克隆两个存储库并将更改推送到 B



我怎样才能将 B 存储库更新为 0.23.1 的完全版本(没有未发布的提交) c $ c> B 变更(补丁)



请给我最好的可维护解决方案。 $ b

解决方案


  1. 使分支releaseA跟踪A中的发布分支一个分支releaseB跟踪B中的发布分支
  2. 通过从每个存储库中提取更新两个分支。
  3. 签出releaseB

  4. 将releaseA合并为releaseB

  5. 推送至B


I have two remotes repositories with C++ Poppler library, say A (original-poppler) and B (another-poppler). The main meaning of second B repository is maintaining Poppler library for some Linux distro and building for them rpm packages.

B was created from A just by copying files - I see the first commit Ported latest version and many committed files - it should be from some A commit (version 0.20).

Starting from this "Ported latest version" repository B lives his life - are added some patches, updated spec files, etc.

A repository was updated to the version 0.23.1 (release) + some other commits after that. I can clone both repositories and push changes to the B.

How can I update this B repository up to the 0.23.1 exactly version (without non-released commits) with respect for B changes (patches)?

Give me please the best maintainable solutions.

解决方案

  1. Make a branch "releaseA" tracking the release branch in A
  2. Make a branch "releaseB" tracking the release branch in B
  3. Update both branches by pulling from each repository.
  4. Checkout "releaseB"
  5. Merge "releaseA" into "releaseB"
  6. Push to B.

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

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