I have one GIT repository in a folder called AA, and I have second GIT repository called BB.
I want to import the AA repository into the BB repository as a sub folder.
before:
AA
|- .git
|- A/
|- fileA
BB
|- .git
|- B/
|- fileB
after:
BB
|- .git # new .git with both AA and BB .git infos
|- B/
|- fileB
|- AA/ # <== no .git anymore
|- AA/A/
|- AA/fileA
How can I do that?
Git addresses this issue using submodules. Submodules allow you to keep a Git repository as a subdirectory of another Git repository. This lets you clone another repository into your project and keep your commits separate.
If folder structure is different a git mv
would solve that:
git mv
all stuff into a new subdir AA
.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With