简体   繁体   中英

.git commit ignoring directories that used to contain a .git

In my index.html I have some iframes that are linked to websites stored in my project. It works fine on my local files, but when I push it to github and open the actual webpage - liviarett.com - I get error 404.

Checking my github repo, I noticed that the websites' directories are showing as a double folder icon, and I read online that that might be because they contained .git files.

So I deleted the .gits and tried committing everything again, but it says there is nothing to commit - I tried changing something else in those folders, but it seems that my .git is ignoring them for some reason. Any thoughts? my repo is https://github.com/liviarett/liviarett.github.io

After Eyorther mentioned that I created a submodule, I found the answer here: https://humansky.com/2011/12/accidentally-adding-a-git-submodule/

Once the .git file is deleted from your directory:

Here is what you need to do in order to remove the submodule and add as a subfolder:

git rm --cached subfolder
git add subfolder
git commit -m "Enter message here"
git push

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM