Merge remote repository commits to the local

心已入冬 提交于 2019-12-24 13:34:41

问题


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:


  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.


来源:https://stackoverflow.com/questions/16920406/merge-remote-repository-commits-to-the-local

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!