打个比方:仓库A:从版本1.0 -> 1.1 -> 2.0仓库B:从版本2.0 -> 2.1 -> 2.2
能否将仓库A和B合并,形成 1.0 -> 1.1 -> 2.0 -> 2.1 -> 2.2 的完整单一仓库?
小伙看你根骨奇佳,潜力无限,来学PHP伐。
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
Create a new remote on B, pointing to A. Then rebase A
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