I have a repo that includes SVG images in an icons/
directory. Attempting to add these images to the repo fails, and Git complains with the error message:
The following paths are ignored by one of your .gitignore files:
public/img/icons/my-icon.svg
Use -f if you really want to add them.
When I traced the ignored files using git-check-ignore
, I found that the Icon?
rule from my .gitignore_global
file was the culprit.
$ git check-ignore -v public/img/icons/my-icon.svg
/Users/ryanatallah/.gitignore_global:42:Icon? public/img/icons/my-icon.svg
What might be an elegant solution to this problem?