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
When I changed anything in those modules I would not see any changes in my main Git repository. I would see only this:
- How do I get the Java API sources?
- publish git repository on webspace
- Git config with directory scope, containing multiple repositories
- Github: Share private repository with another organization
- Bitbucket git repository printed strange colored flower after push. WTH?
- Repo Sync to start with SDK 2012
+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.
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:
my_project/ .git dir1 dir2 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:
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.
One Solution collect form web for “Add subproject as usual folder to repository”
After suggestion I looked at this: un-submodule a git submodule
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.