Let's say your parent directory is named parent
, and your child directories are named package1
, package2
, and package3
. Let's also assume that package1
is the directory where you have your git repository. I would just make another package1
directory as a child of the original package1
directory, and move the contents of the original package1
directory into it. Then move package2
and package3
to be children of the original package1
. You can the rename the original package1
to parent. git add --all .
the whole thing, and you now have a repo with all three directories. The cool thing is that you will not lose the history of all the files you moved; git is smart enough to detect renames/moves.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…