I had Git a project with other Git project inside.
I finally decided to remove the second one, so I removed the .git
directory:
rm -rf /pathToProject/pathToProjectInsideProject/.git
But now, when I do git status
I can't see the changes on the pathToProject/pathToProjectInsideProject/
directory.
I've try with:
git add pathToProjectInsideProject
but nothing changes. Any idea of how to include this directory to the main git repository?
Edit:
When I try to add a single file with force
(git add --force pathToProjectInsideProject/file.php
) I'm getting this error:
pathToProjectInsideProject/file.php is in submodule pathToProjectInsideProject
Edit2:
This question is duplicate: How do I add files in Git to the path of a former submodule?.
The solution is:
git rm --cached pathToProjectInsideProject
git add pathToProjectInsideProject