0

With the 1.7.8 update to git, submodules are now stored in the .git/modules directory instead of within the repo source tree.

Old way:

src/modules/MyDependency/header.h

New way:

src/modules/MyDependency/.git  (with gitdirs: ../../../.git/modules/MyDependency)
.git/modules/MyDependency/header.h

How can I make git check out files in the Old pre-1.7.8 way?

Thanks a lot!

BACKGROUND

I am pulling a rather large repo that is in active development which I do not have write access to. This repo has about 30 submodules. It also has a Visual Studio .sln that includes file paths to the old-style locations.

I do not want to modify the .sln to point to the new locations because I do not want a merge nightmare. I do not want to pull using an old version of git if I can help it (I don't remember when the Windows Credential Management was added to git, but I need it). It seems like git would support the old way for situations just like this one.

Google search and git help pull didn't give me much.

Ian
  • 841
  • 5
  • 10
  • 1
    The new (if we can call it *new*) `git submodule absorbgitdirs` does the transition you *don't* want; there's none to go the other way. Git 1.7.8 is dated `Fri Dec 2 10:03:01 2011 -0800`: 7 years old. It's hard to go back. You might have to write your own code. – torek Jan 29 '19 at 06:31
  • Thank you torek. Your response pointed me to better search terms and I found this answer: https://stackoverflow.com/questions/44559306/opposite-reverse-of-git-submodule-absorbgitdirs – Ian Jan 29 '19 at 16:59

0 Answers0