1

Here is my situation. I have a project that looks (I have simplified) like this:

/file1.php
/file2.php
/folder1/
/folder2/folder3

Right now folder1 and folder2/fodler3 have existing GIT repositories. I would like to create a repository in / that would control all the project. However, I don't want to lose the history of the folder1 repository. Even though that I want to get rid of that repository, so that I just have one repository for the whole project.

What is the approach that I should take in order to mantain the history of folder1 repository and folder2/folder3 repository, but create a new repo in the root folder and get rid of those?

Hommer Smith
  • 26,772
  • 56
  • 167
  • 296

1 Answers1

0

Git 1.9.11 and later allows you to create subtrees using the git subtree command, but there are other options outlined the links below.

How do you merge two Git repositories?

Merge two Git repositories without breaking file history

Community
  • 1
  • 1
Adam
  • 4,445
  • 1
  • 31
  • 49