.gitignore files deleted but files still ignored (git status doesn't show, can't add)
Well, I’m trying to track all the files I edited in my project, but
git status doesn’t seem to be working: it doesn’t show some files that were changed. I’ve searched a lot about what could be happening but couldn’t go far.
I noticed I have some
.gitignore files inside my theme folder /wp-content/themes/mytheme/.gitignore (and subfolders too) and I removed them. Have no idea of how they appeared there. I believe they are ignoring the files I modified.
- Can I share an ignore file between mercurial and git?
- What exactly does GitHub's “create a new project” menu item “Git ignore” do?
- .gitignore regex for emacs temporary files
- .gitignore ignoring more than I want to?
- Git ignore unignore not working?
- .gitignore Doesn't Seem To Work
What I need is to be able to track all modified files to
push to bitbucket. (removing
.gitignore files manually didn’t solve the problem).
One Solution collect form web for “.gitignore files deleted but files still ignored (git status doesn't show, can't add)”
I’m assuming that by “git status doesn’t seem to be working”, you mean that modified files do not appear in the command’s output.
If this is the case, your problem is probably caused by the fact that the files have been
gitignored, and remained in the git’s cache as such.
Running these two commands may solve your problem then:
git rm -r --cached . git add .
Your problem looks similar to this one, but the other way around. Have a look at the top voted solution and its comments.
Make sure that you have a backup of your files before playing around, just in case.