I used
git status --ignored
To check which files were ignored as follows :
git status --ignored
# On branch SIT
# Ignored files:
# (use "git add -f <file>..." to include in what will be committed)
#
# web/sites/default/files/
So, that's fine. But when I use :
git add -f web/sites/default/files/
And then use "git status --ignored" again it shows the same file. Even after adding these to a commit.
You probably need to add a file under that directory, rather than adding the directory on its own. To add all contents of that directory:
I had a similar issue, although my issue was caused by a
git update-index --assume-unchanged
command that I had issued earlier without fully understanding it. In case someone arrives here for a similar reason, I solved my issue by executing:Refer to the git-update-index docs for more details.