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 credneital-manager-st is not a git command on Windows 10
  • Does GitHub Enterprise support shallow cloning?
  • Merge and push to 2 different repos by default
  • Find the commit sha of a file with git
  • git rm --cached everything that is listed in .gitignore
  • command line version control with Java — dealing with lots of nested dirs
  • 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?

  • What is a good Git's strategy for this case?
  • Not want commit some folder in Git
  • Cannot pull, git cannot resolve reference ORIG_HEAD
  • How to make git diff treat a file as binary _only sometimes_
  • Why is `git show` indentation inconsistent?
  • how do you use golang with a private gitlab repo?
  • 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.

    Git Baby is a git and github fan, let's start git clone.