2

How to move files from one repo to another repo having different directory structure without loosing history of source repo in Git.

Example - Suppose I have an old repo (repoA) which has all the files with history. Now I want to move these files to a new repo (repoB) with different directory structure. The constraint is repoB should have the history of files as in repoA when moving.

Please help on this.

repoA| |-src | |-resources |

repoB| |-src/xyz | |-resuorces/xyz

  • 1
    You can't easily do this, but why do you need to do this in the first place? – Tim Biegeleisen Oct 16 '17 at 08:37
  • If you want a different directory structure but still want all the history, why not just alter the directory structure of the current repo? Those directory changes will be reflected in `git status` and therefore can be committed. – rst-2cv Oct 16 '17 at 08:42
  • The answers to this question may help: https://stackoverflow.com/questions/34235940/git-is-it-possible-to-pick-files-or-changes-from-a-different-repo-with-differen – Alex Feinman Dec 09 '17 at 14:02

0 Answers0