[Solved] Accidently added another git repository inside the current repository – grey icon on the remote repository

This problem is due to a submodule, pointing to an unreachable remote location.

Changed directory to the offending dir:

cd <offending git submodule>

Remove the .git directory inside it:

rm -rf .git

Update the git cache:

git rm --cached <offending git submodule>

Go to the parent directory:

cd ..

Add the directory to git:

git add .
git commit -m "Changed submodule to directory"
git push --all

Don’t miss these tips!

We don’t spam! Read our privacy policy for more info.

Open chat
Powered by