Black/unclickable folder in github after push
Git noob here…I tried to reset my index in my git repo so that I could add my .gitignore file and have it ignore things.
So I did this:
git rm -r --cached . git add . git commit -m "making .gitignore ignore"
and then when I pushed it to github one of my main project folders(django project) is suddenly black and I can’t click on it or anything. It seems like the files just didn’t get added back to the index but I’m not sure why. I’ve tried adding them back but commit then tells me there is nothing to commit even though it also says the folder has been modified.
I’m having other issues but I guess my main worry is that I will lose my project in its current state because I finally have some tweaks working.
Why is the folder black and how can I make it blue again?
One Solution collect form web for “Black/unclickable folder in github after push”
git rm -r --cached . untracks all your files in a directory, leaving them as simple files on your drive. That’s why you still see them on your local repo, but they disappeared on GitHub.
To roll back to previous state, assuming you didn’t commit anything after the
rm commit, do:
git reset --hard HEAD~ git push --force
Instead, you’ll want to selectively remove the files you want to ignore with
git rm --cached <files>, add them to
.gitignore, and commit.