There are two Git repositories, the old and the new, can they be merged?
伊谢尔伦
伊谢尔伦 2017-05-02 09:28:29
0
3
625

For example:
Warehouse A: From version 1.0 -> 1.1 -> 2.0
Warehouse B: From version 2.0 -> 2.1 -> 2.2

Can warehouses A and B be merged to form a complete single warehouse 1.0 -> 1.1 -> 2.0 -> 2.1 -> 2.2?

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(3)
世界只因有你

Create a new remote on B, pointing to A. Then rebase A

git remote add upstream A
git fetch upstream
git rebase upstream
淡淡烟草味

The warehouses are independent and there is no merging mechanism. There can be branches under the same warehouse, and branches can be merged.

为情所困

It can be done by cramming all these commits into one repo

But you can’t change the existing commit. You can’t connect 1.1 in front of 2.0. You can only rebuild 2.0 / 2.1 with the same content after 1.1

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template