0

Say, I got 2 git repos: A and B. Both repos have its 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~

Drake Guan
  • 14,514
  • 15
  • 67
  • 94

1 Answers1

2

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?

Community
  • 1
  • 1
Mark Longair
  • 446,582
  • 72
  • 411
  • 327