开发者

Is it possible/reasonable to convert a git repo into sub-folder of another git repo?

开发者 https://www.devze.com 2023-02-15 12:00 出处:网络
Say, I got 2 git repos: A and B. Both repos have i开发者_运维问答ts own commit history. Now, I would like to embed the whole history of A into B, sub-foldered as BA, and then delete the repo A. That i

Say, I got 2 git repos: A and B. Both repos have i开发者_运维问答ts own commit history. Now, I would like to embed the whole history of A into B, sub-foldered as BA, and then delete the repo A. That is, the newly repo B now has the full history of A and B in one. Can I do that?

The reason I would like to do this is to merge 2 repos into one by put one repo as another repo's package (the python way), but I also like to have the complete committing history of both repos for tracking~


Yes, it's quite possible to do that. For example, see the Subtree Merge section of Jakub Narębski's answer here: How do you merge two Git repositories?

0

精彩评论

暂无评论...
验证码 换一张
取 消