1

I have two git repositories, A and Z. A has a sub-directory A/B. I would like to move A/B/... and all the history of how it got to its present state to Z so it appears as Z/B/.... I would then like to remove all traces of A/B without that impacting the now Z/B. A and B will both continue as separate, independent repos from that point forward.

I have looked at the many questions that refer to making B it's own separate repository. I don't want that - B more appropriately belongs as part of Z but I would like to maintain the history of how B got to its current state. how-to-move-files-from-one-git-repo-to-another-not-a-clone-preserving-history seems close but convoluted and individual file based.I am hoping git may have made this simpler in the 5 years since that was asked.

Community
  • 1
  • 1
jwd630
  • 4,529
  • 1
  • 20
  • 22

0 Answers0