Git is ignoring files that aren't in gitignore

2020-01-24 20:09发布

I have a git repository that is ignoring image files as well as a few other files, but my .gitignore file only has it ignoring a config.php file. Is there some global ignore file somewhere that I can't seem to find? I have to specify files to add them now, and it's giving me this warning:

The following paths are ignored by one of your .gitignore files.

The contents of my ~/.gitconfig file are only my e-mail address.

标签: git gitignore
13条回答
我只想做你的唯一
2楼-- · 2020-01-24 20:45

One more thing: if the directory you're in requires root access for writing or executing, make sure you're on the root user. I actually got a weird error where I was trying to add a submodule and git kept complaining that the path I was cloning into was being ignored by a git ignore file. Then I changed to root user, ran the submodule add again, and there was no problem.

查看更多
登录 后发表回答