问题
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
- Make a branch "releaseB" tracking the release branch in B
- Update both branches by pulling from each repository.
- Checkout "releaseB"
- Merge "releaseA" into "releaseB"
- Push to B.
来源:https://stackoverflow.com/questions/16920406/merge-remote-repository-commits-to-the-local