![](/img/trans.png)
[英]How to add two separate git repos into one repo as two directories while preserving commit history?
[英]how to split one git repo into two without changing the history commit hash
我有一個像這樣的GIT倉庫:
/ --- [lots of work] / root --- ref_a --- .---- [ Lots of work ] orphane commit based on ref_a--- [Lots ofworks] \\ --- [lots of work]
我想將此倉庫分成兩個倉庫
repo1:
/ --- [lots of work] / root --- ref_a --- .---- [ Lots of work ]
repo2:
orphane commit based on ref_a--- [Lots ofworks] \\ --- [lots of work]
我想保持所有提交哈希完整。
可能嗎?
/ --- [lots of work] (branch1)
/
root --- ref_a --- .---- [ Lots of work ] (branch2)
orphane commit
based on ref_a--- [Lots ofworks] (branch3)
\ --- [lots of work] (branch4)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.