1

I have a third party complex project in git. It uses Carthage to manage submodules. I need to customize submodules. After initial checkout of submodules with the command

git submodule update --init --recursive

I should be independent of the original references and submodules.

I saw the following, but I could not completely be successful un-submodule a git submodule

How do I go about? given there must be enhancements and updates to git capabilities

Any automated script out there? Please keep in mind that there are several submodules, some in deeply embedded directories.

Many thanks in advance!

tech_geek
  • 147
  • 2
  • 11
  • The answers in the linked question appear (I skimmed so this could be wrong) designed to make all the *files* in the submodule become part of the now-de-submodule-d repository. Your question sounds like you want to *not* do that, i.e., you want to convert the submodule to an ordinary repository that is no longer a submodule in its parent superproject. If so, that *should* be relatively straightforward except for the "absorbgitdirs" feature leaving the `.git` directories for each submodule inside the `.git` directory for the overall superproject. – torek Feb 12 '19 at 17:14
  • Thanks Torek ; yes you are correct, that, I want to convert the submodule to an ordinary repository that is no longer a submodule in its parent superproject, so whenevener we checkout it wont be fetched from original repos. The issue I am seeing is submodule config directories and sub directories are not being properly added when I push to remote repo. Perhaps, I am missing something, can you please share the commands so everything is part of main and all dirs/configs are included. Thanks! – tech_geek Feb 12 '19 at 19:11
  • I don't know what you mean by *submodule config directories* here. Once a submodule is not a submodule any more, it's just an ordinary Git repository. The `.git/config` file is never transferred by Git, and other files that are in commits are just files that are in commits. (The latter was true even when the submodule was a submodule, since "submodule-ness" is really just the property of being referred-to by some superproject.) – torek Feb 12 '19 at 19:13

0 Answers0