Add subproject as usual folder to repository

I noticed that in my directory there were two modules that had been Subprojects of my Git repository. That happened because I moved them all to one Git repo and those modules (directories) had their own .git directory.

When I changed anything in those modules I would not see any changes in my main Git repository. I would see only this:

+Subproject commit e97ff0348e6adc697192ca4e6a367bdaeddcda6b-dirty


But I don’t need that. I only need one Git repository without any subprojects. So I deleted .git directories inside those subprojects. And now I don’t see any changes at all on my main repository.

I tried add * and git init. But it just does not see those directories even though it is inside repository. How can I make Git see those directories, so it would track their changes like other modules?

My Git repository looks something like this:

 dir3 # Let's say this is the one directory that Git does not see. So any changes I make here are not tracked at all.

P.S. Those directories that are not tracked are not empty.

If I rename that directory, then doing this:
git diff

I get this:

diff --git a/dir3 b/dir3
deleted file mode 160000
index e279fc4..0000000
--- a/dir3
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit e279fc481b9706ad79b24281efdbabd55179aee8

If I rename that directory back to original name, then doing git diff, returns nothing or just that there were no changes done.

  • How to delete commits from bitbucket
  • Create new SVN repository from checkout code (from dead SVN repo)
  • Github “Failed to publish this branch” error on windows
  • Identifying a tag belongs to which branch in git
  • Can I connect from VS 2015 to VSTS and GitHub the same time?
  • Always overwrite a git deployment branch
  • need more understanding on gitblit groovy push script
  • How do you structure your SVN repository?
  • One Solution collect form web for “Add subproject as usual folder to repository”

    After suggestion I looked at this: un-submodule a git submodule

    First tried:

    git submodule deinit

    After this it didn’t change the old behavior. But when I did this:

    git rm --cached yourSubmodule

    Then it removed it as submodule and git started seeing those modules in main repository.

    Git Baby is a git and github fan, let's start git clone.